#include <coherence/util/SortedMap.hpp>
Inherits Map.
Inherited by TreeMap [virtual]
.
Public Types | |
typedef spec::Handle | Handle |
SortedMap Handle definition. | |
typedef spec::View | View |
SortedMap View definition. | |
typedef spec::Holder | Holder |
SortedMap Holder definition. | |
Public Member Functions | |
virtual Comparator::View | comparator () const =0 |
Returns the comparator used in sorting this map, or NULL if it is the keys' natural ordering. | |
virtual Object::View | firstKey () const =0 |
Returns the first (lowest sorted) key in the map. | |
virtual Object::View | lastKey () const =0 |
Returns the last (highest sorted) key in the map. | |
virtual SortedMap::Handle | headMap (Object::View vToKey)=0 |
Returns a handle of the portion of the map strictly less than toKey. | |
virtual SortedMap::View | headMap (Object::View vToKey) const =0 |
Returns a view of the portion of the map strictly less than toKey. | |
virtual SortedMap::Handle | subMap (Object::View vFromKey, Object::View vToKey)=0 |
Returns a handle of the portion of the map greater than or equal to fromKey, and strictly less than toKey. | |
virtual SortedMap::View | subMap (Object::View vFromKey, Object::View vToKey) const =0 |
Returns a view of the portion of the map greater than or equal to fromKey, and strictly less than toKey. | |
virtual SortedMap::Handle | tailMap (Object::View vFromKey)=0 |
Returns a handle of the portion of the map greater than or equal to fromKey. | |
virtual SortedMap::View | tailMap (Object::View vFromKey) const =0 |
Returns a view of the portion of the map greater than or equal to fromKey. |
virtual Comparator::View comparator | ( | ) | const [pure virtual] |
Returns the comparator used in sorting this map, or NULL if it is the keys' natural ordering.
Implemented in TreeMap.
virtual Object::View firstKey | ( | ) | const [pure virtual] |
Returns the first (lowest sorted) key in the map.
NoSuchElementException | if this map is empty. |
Implemented in TreeMap.
virtual Object::View lastKey | ( | ) | const [pure virtual] |
Returns the last (highest sorted) key in the map.
NoSuchElementException | if this map is empty. |
Implemented in TreeMap.
virtual SortedMap::Handle headMap | ( | Object::View | vToKey | ) | [pure virtual] |
Returns a handle of the portion of the map strictly less than toKey.
The handle is backed by this map, so changes in one show up in the other. The sub-map supports all optional operations of the original.
vToKey | the exclusive upper range of the sub-map |
ClassCastException | if toKey is not comparable to the map contents | |
IllegalArgumentException | if this is a subMap, and toKey is out of range | |
NullPointerException | if toKey is NULL but the map does not allow NULL keys |
Implemented in TreeMap.
virtual SortedMap::View headMap | ( | Object::View | vToKey | ) | const [pure virtual] |
Returns a view of the portion of the map strictly less than toKey.
vToKey | the exclusive upper range of the sub-map |
ClassCastException | if toKey is not comparable to the map contents | |
IllegalArgumentException | if this is a subMap, and toKey is out of range | |
NullPointerException | if toKey is NULL but the map does not allow NULL keys |
Implemented in TreeMap.
virtual SortedMap::Handle subMap | ( | Object::View | vFromKey, | |
Object::View | vToKey | |||
) | [pure virtual] |
Returns a handle of the portion of the map greater than or equal to fromKey, and strictly less than toKey.
The handle is backed by this map, so changes in one show up in the other. The sub-map supports all optional operations of the original.
vFromKey | the inclusive lower range of the sub-map | |
vToKey | the exclusive upper range of the sub-map |
ClassCastException | if fromKey or toKey is not comparable to the map contents | |
IllegalArgumentException | if this is a subMap, and fromKey or toKey is out of range | |
NullPointerException | if fromKey or toKey is NULL but the map does not allow NULL keys |
Implemented in TreeMap.
virtual SortedMap::View subMap | ( | Object::View | vFromKey, | |
Object::View | vToKey | |||
) | const [pure virtual] |
Returns a view of the portion of the map greater than or equal to fromKey, and strictly less than toKey.
vFromKey | the inclusive lower range of the sub-map | |
vToKey | the exclusive upper range of the sub-map |
ClassCastException | if fromKey or toKey is not comparable to the map contents | |
IllegalArgumentException | if this is a subMap, and fromKey or toKey is out of range | |
NullPointerException | if fromKey or toKey is NULL but the map does not allow NULL keys |
Implemented in TreeMap.
virtual SortedMap::Handle tailMap | ( | Object::View | vFromKey | ) | [pure virtual] |
Returns a handle of the portion of the map greater than or equal to fromKey.
The handle is backed by this map, so changes in one show up in the other. The sub-map supports all optional operations of the original.
vFromKey | the inclusive lower range of the sub-map |
ClassCastException | if fromKey is not comparable to the map contents | |
IllegalArgumentException | if this is a subMap, and fromKey is out of range | |
NullPointerException | if fromKey is NULL but the map does not allow NULL keys |
Implemented in TreeMap.
virtual SortedMap::View tailMap | ( | Object::View | vFromKey | ) | const [pure virtual] |
Returns a view of the portion of the map greater than or equal to fromKey.
vFromKey | the inclusive lower range of the sub-map |
ClassCastException | if fromKey is not comparable to the map contents | |
IllegalArgumentException | if this is a subMap, and fromKey is out of range | |
NullPointerException | if fromKey is NULL but the map does not allow NULL keys |
Implemented in TreeMap.