#include <coherence/util/SortedMap.hpp>
Inherits Map.
Inherited by NavigableMap [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 vToKey. | |
virtual SortedMap::View | headMap (Object::View vToKey) const =0 |
Returns a view of the portion of the map strictly less than vToKey. | |
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 vFromKey, and strictly less than vToKey. | |
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 vFromKey, and strictly less than vToKey. | |
virtual SortedMap::Handle | tailMap (Object::View vFromKey)=0 |
Returns a handle of the portion of the map greater than or equal to vFromKey. | |
virtual SortedMap::View | tailMap (Object::View vFromKey) const =0 |
Returns a view of the portion of the map greater than or equal to vFromKey. |
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 vToKey.
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 vToKey is not comparable to the map contents | |
IllegalArgumentException | if this is a sub-map, and vToKey is out of range | |
NullPointerException | if vToKey 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 vToKey.
vToKey | the exclusive upper range of the sub-map |
ClassCastException | if vToKey is not comparable to the map contents | |
IllegalArgumentException | if this is a sub-map, and vToKey is out of range | |
NullPointerException | if vToKey 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 vFromKey, and strictly less than vToKey.
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 vFromKey or vToKey is not comparable to the map contents | |
IllegalArgumentException | if this is a sub-map, and vFromKey or vToKey is out of range | |
NullPointerException | if vFromKey or vToKey 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 vFromKey, and strictly less than vToKey.
vFromKey | the inclusive lower range of the sub-map | |
vToKey | the exclusive upper range of the sub-map |
ClassCastException | if vFromKey or vToKey is not comparable to the map contents | |
IllegalArgumentException | if this is a sub-map, and vFromKey or vToKey is out of range | |
NullPointerException | if vFromKey or vToKey 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 vFromKey.
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 vFromKey is not comparable to the map contents | |
IllegalArgumentException | if this is a sub-map, and vFromKey is out of range | |
NullPointerException | if vFromKey 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 vFromKey.
vFromKey | the inclusive lower range of the sub-map |
ClassCastException | if vFromKey is not comparable to the map contents | |
IllegalArgumentException | if this is a sub-map, and vFromKey is out of range | |
NullPointerException | if vFromKey is NULL but the map does not allow NULL keys |
Implemented in TreeMap.