|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
wt.eff.EffHistoryMap
This class is an unmodifiable implementation of the java.util.SortedMap interface for representing a historical sequence of mutually compatible (see EffSet) sets of Eff objects. Each key of this map is a wt.fc.ObjectReference object identifying an EffChangeAudit object, to which is mapped a set of mutually compatible Eff objects resulting from the effectivity change represented by the EffChangeAudit object.
Note: this map does not assert the mutual compatibility of the members of its value sets; this is the responsibility of the application.
This map supports null keys, but not null values.
Nested Class Summary |
Nested classes inherited from class java.util.AbstractMap |
|
Nested classes inherited from class java.util.Map |
Map.Entry |
Field Summary | |
private SortedMap |
map
|
Fields inherited from class java.util.AbstractMap |
|
Constructor Summary | |
|
EffHistoryMap(Eff[] effs,
boolean chronological)
Creates a new EffHistoryMap object based on the argument array of Eff objects, in chronological or anti-chronological order, as specified. |
private |
EffHistoryMap(SortedMap map)
Creates a new EffHistoryMap object based on the argument java.util.SortedMap. |
Method Summary | |
Comparator |
comparator()
Returns the comparator used to order this sorted map. |
boolean |
containsKey(Object key)
Returns true if this map contains a mapping for the specified key. |
Set |
entrySet()
Returns a set view of the mappings contained in this map. |
Object |
firstKey()
Returns the first (lowest) key currently in this sorted map. |
Object |
get(Object key)
Returns the value to which this map maps the specified key. |
SortedMap |
headMap(Object toKey)
Returns a view of the portion of this sorted map whose keys are strictly less than toKey. |
Object |
lastKey()
Returns the last (highest) key currently in this sorted map. |
private void |
put(ObjectReference key,
Eff value,
int index)
Put the specified Eff object in this map, using the specified key and index. |
Object |
remove(Object key)
This implementation always throws an UnsupportedOperationException, efficiently in O(1) time. |
SortedMap |
subMap(Object fromKey,
Object toKey)
Returns a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive. |
SortedMap |
tailMap(Object fromKey)
Returns a view of the portion of this sorted map whose keys are greater than or equal to fromKey. |
Methods inherited from class java.util.AbstractMap |
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
clear, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, size, values |
Field Detail |
private SortedMap map
Constructor Detail |
public EffHistoryMap(Eff[] effs, boolean chronological)
effs
- array of mutually compatible Eff objects constituting a valid historical sequence
chronological boolean flag specifying whether this sorted map is sorted in chronological or anti-chronological order
NullPointerException
- if the argument array or any of its elements are null.
wt.util.WTRuntimeException if the argument Eff objects are not all mutually compatible; note:/b> a failure to throw a wt.util.WTRuntimeException does not imply that all elements are mutually compatibleprivate EffHistoryMap(SortedMap map)
Method Detail |
private void put(ObjectReference key, Eff value, int index)
public boolean containsKey(Object key)
containsKey
in interface Map
key
- key whose presence in this map is to be tested.
ClassCastException
- if !(key instanceof wt.fc.ObjectReference)public Object get(Object key)
get
in interface Map
key
- key whose associated value is to be returned.
ClassCastException
- if !(key instanceof wt.fc.ObjectReference)public Object remove(Object key)
remove
in interface Map
key
- key whose mapping is to be removed from the map.
UnsupportedOperationException
- on all invocations.public Set entrySet()
entrySet
in interface Map
public Comparator comparator()
comparator
in interface SortedMap
public SortedMap subMap(Object fromKey, Object toKey)
subMap
in interface SortedMap
fromKey
- low endpoint (inclusive) of the sub map,
toKey high endpoint (exclusive) of the sub map.
ClassCastException
- if !(fromKey instanceof wt.fc.ObjectReference && toKey instanceof wt.fc.ObjectReference),
IllegalArgumentException if fromKey is greater than toKey, or if fromKey or toKey is not within the range of this sorted map.public SortedMap headMap(Object toKey)
headMap
in interface SortedMap
toKey
- high endpoint (exclusive) of the head map.
ClassCastException
- if !(toKey instanceof wt.fc.ObjectReference),
IllegalArgumentException if toKey is not within the range of this sorted map.public SortedMap tailMap(Object fromKey)
tailMap
in interface SortedMap
fromKey
- low endpoint (inclusive) of the tail map.
ClassCastException
- if !(fromKey instanceof wt.fc.ObjectReference),
IllegalArgumentException if fromKey is not within the range of this sorted map.public Object firstKey()
firstKey
in interface SortedMap
java.util.NoSuchElementException
- if this sorted map is emptypublic Object lastKey()
lastKey
in interface SortedMap
java.util.NoSuchElementException
- if this sorted map is empty
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |