SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND


Platform::Containers
Template Class SortedMap

GeneralContainerType
   |
   +-GeneralDictionaryType
        |
        +-SortedMap

Implemented in:
Platform.Containers.SortedMap.h

template <typename Key, typename Value, typename Comparator = Lang::TypeActors::Comparator<Key>>
class SortedMap:
public GeneralDictionaryType

A dynamically sized, associative, ordered map container.

See Also:
Containers

Inner Compounds, Typedefs, and Enumscollapse
struct Position
          DOCTODO.
typedef ComparatorType
          DOCTODO.
typedef KeyType
          DOCTODO.
typedef ValueType
          DOCTODO.

Inner Compounds, Typedefs, and Enums inherited from class GeneralDictionaryTypecollapse
ConstEnumerator, ConstIterator, Entry, EntryType, Enumerator, Iterator

Fields inherited from class GeneralContainerTypecollapse
base

Constructor Summarycollapse
SortedMap()
          DOCTODO.
SortedMap(const SortedMap& container)
          DOCTODO.
template <typename ContainerX>
SortedMap(const ContainerX& container)

          DOCTODO.
~SortedMap()
          Destructor.

Method Summarycollapse
template <typename Collection,
typename Predicate>
Collection&
collectEntries(Collection& collection, Predicate function) const
          DOCTODO.
template <typename Collection>
Collection&
collectEntriesRange(Collection& collection, const Position& fromPos, const Position& toPos) const
          DOCTODO.
Position equal(const KeyType& key) const
          DOCTODO.
Pair<Key,
Value>
extractFirst()
          Removes and returns a key-value mapping associated with the least key in this map.
Pair<Key,
Value>
extractLast()
          Removes and returns a key-value mapping associated with the greatest key in this map.
EntryType first()
          Returns a key-value mapping associated with the least key in this map.
const EntryType first() const
          Returns a key-value mapping associated with the least key in this map.
Position highest() const
          DOCTODO.
Position highestLessThan(const KeyType& key, Bool predecessor = False) const
          DOCTODO.
EntryType last()
          Returns a key-value mapping associated with the greatest key in this map.
const EntryType last() const
          Returns a key-value mapping associated with the greatest key in this map.
Position lowest() const
          DOCTODO.
Position lowestGreaterThan(const KeyType& key, Bool successor = False) const
          DOCTODO.
SortedMap& operator=(const SortedMap& container)
          DOCTODO.
Position predecessor(const Position& position) const
          DOCTODO.
Void removeFirst()
          Removes a key-value mapping associated with the least key in this map.
Void removeLast()
          Removes a key-value mapping associated with the greatest key in this map.
Int removeRange(const Position& fromPos, const Position& toPos)
          Removes mappings in this map from the specified fromKey (inclusive) until toKey (exclusive).
Position successor(const Position& position) const
          DOCTODO.

Methods inherited from class GeneralContainerTypecollapse
compareTo, deepSize, empty, equals, exchangeWith, hashCode, isEmpty, size, toString, toXml

Methods inherited from class GeneralDictionaryTypecollapse
add, addAll, addAll, containsAll, containsAll, containsAllKeys, containsKey, containsValue, get, get, get, put, put, putAll, putAll, remove, remove, toString

Friend Summarycollapse
friend Io::ISerializer& operator<<(Io::ISerializer& serializer, const SortedMap& container)
          Serializes the state of an SortedMap object.
friend Io::IDeserializer& operator>>(Io::IDeserializer& deserializer, SortedMap& container)
          Deserializes the state of an SortedMap object.

 

Constructor Detail

SortedMap[inline]

SortedMap()

DOCTODO.


SortedMap[inline]

SortedMap(const SortedMap& container)

DOCTODO.

Parameters:
container - DOCTODO

SortedMap[explicit, inline]

template <typename ContainerX>
SortedMap(const ContainerX& container)

DOCTODO.

Parameters:
container - DOCTODO

~SortedMap[inline]

~SortedMap()

Destructor.

 

Method Detail

collectEntries[inline]

template <typename Collection, typename Predicate>
Collection& collectEntries(Collection& collection, Predicate function) const

DOCTODO.

Parameters:
collection - DOCTODO
function - DOCTODO
Returns:
DOCTODO

collectEntriesRange[inline]

template <typename Collection>
Collection& collectEntriesRange(Collection& collection, const Position& fromPos, const Position& toPos) const

DOCTODO.

Parameters:
collection - DOCTODO
fromPos - DOCTODO
toPos - DOCTODO
Returns:
DOCTODO

equal[inline]

Position equal(const KeyType& key) const

DOCTODO.

Parameters:
key - DOCTODO
Returns:
DOCTODO

extractFirst[inline]

Pair<Key, Value> extractFirst()

Removes and returns a key-value mapping associated with the least key in this map.

Returns:
the removed first key of this map
Preconditions:
the map must not be empty

extractLast[inline]

Pair<Key, Value> extractLast()

Removes and returns a key-value mapping associated with the greatest key in this map.

Returns:
the removed last key of this map
Preconditions:
the map must not be empty

first[inline]

EntryType first()

Returns a key-value mapping associated with the least key in this map. The map must not be empty.

Returns:
a key-value mapping associated with the least key in this map
Preconditions:
the map must not be empty

first[inline]

const EntryType first() const

Returns a key-value mapping associated with the least key in this map. The map must not be empty.

Returns:
a key-value mapping associated with the least key in this map
Preconditions:
the map must not be empty

highest[inline]

Position highest() const

DOCTODO.

Returns:
DOCTODO

highestLessThan[inline]

Position highestLessThan(const KeyType& key, Bool predecessor = False) const

DOCTODO.

Parameters:
key - DOCTODO
predecessor - DOCTODO
Returns:
DOCTODO

last[inline]

EntryType last()

Returns a key-value mapping associated with the greatest key in this map. The map must not be empty.

Returns:
a key-value mapping associated with the greatest key in this map

last[inline]

const EntryType last() const

Returns a key-value mapping associated with the greatest key in this map. The map must not be empty.

Returns:
a key-value mapping associated with the greatest key in this map

lowest[inline]

Position lowest() const

DOCTODO.

Returns:
DOCTODO

lowestGreaterThan[inline]

Position lowestGreaterThan(const KeyType& key, Bool successor = False) const

DOCTODO.

Parameters:
key - DOCTODO
successor - DOCTODO
Returns:
DOCTODO

operator=[inline]

SortedMap& operator=(const SortedMap& container)

DOCTODO.

Parameters:
container - DOCTODO
Returns:
DOCTODO

predecessor[inline]

Position predecessor(const Position& position) const

DOCTODO.

Parameters:
position - DOCTODO
Returns:
DOCTODO

removeFirst[inline]

Void removeFirst()

Removes a key-value mapping associated with the least key in this map.


removeLast[inline]

Void removeLast()

Removes a key-value mapping associated with the greatest key in this map.


removeRange[inline]

Int removeRange(const Position& fromPos, const Position& toPos)

Removes mappings in this map from the specified fromKey (inclusive) until toKey (exclusive).

Parameters:
fromPos - DOCTODO
toPos - DOCTODO
Returns:
DOCTODO

successor[inline]

Position successor(const Position& position) const

DOCTODO.

Parameters:
position - DOCTODO
Returns:
DOCTODO

 

Friend Detail

operator<<[inline]

friend Io::ISerializer& operator<<(Io::ISerializer& serializer, const SortedMap& container)

Serializes the state of an SortedMap object.

Parameters:
container - an ordered map object to serialize
serializer - a serializer to receive state data
Returns:
the reference to the serializer

operator>>[inline]

friend Io::IDeserializer& operator>>(Io::IDeserializer& deserializer, SortedMap& container)

Deserializes the state of an SortedMap object.

Parameters:
container - an ordered map object to deserialize
deserializer - a deserializer to retrieve state data from
Returns:
the reference to the deserializer


SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND