public abstract class AbstractSortedBidiMapDecorator extends AbstractOrderedBidiMapDecorator implements SortedBidiMap
Methods are forwarded directly to the decorated map.
This implementation does not perform any special processing with the map views. Instead it simply returns the inverse from the wrapped map. This may be undesirable, for example if you are trying to write a validating implementation it would provide a loophole around the validation. But, you might want that loophole, so this class is kept simple.
map| Constructor and Description |
|---|
AbstractSortedBidiMapDecorator(SortedBidiMap map)
Constructor that wraps (not copies).
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Comparator |
comparator() |
protected SortedBidiMap |
getSortedBidiMap()
Gets the map being decorated.
|
java.util.SortedMap |
headMap(java.lang.Object toKey) |
SortedBidiMap |
inverseSortedBidiMap()
Gets a view of this map where the keys and values are reversed.
|
java.util.SortedMap |
subMap(java.lang.Object fromKey,
java.lang.Object toKey) |
java.util.SortedMap |
tailMap(java.lang.Object fromKey) |
firstKey, getOrderedBidiMap, inverseOrderedBidiMap, lastKey, nextKey, orderedMapIterator, previousKeygetBidiMap, getKey, inverseBidiMap, mapIterator, removeValueclear, containsKey, containsValue, entrySet, equals, get, getMap, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, valuesclone, finalize, getClass, notify, notifyAll, wait, wait, waitinverseBidiMapinverseOrderedBidiMapgetKey, mapIterator, put, removeValuefirstKey, lastKey, nextKey, orderedMapIterator, previousKeypublic AbstractSortedBidiMapDecorator(SortedBidiMap map)
map - the map to decorate, must not be nulljava.lang.IllegalArgumentException - if the collection is nullprotected SortedBidiMap getSortedBidiMap()
public SortedBidiMap inverseSortedBidiMap()
SortedBidiMap
Changes to one map will be visible in the other and vice versa.
This enables both directions of the map to be accessed as a SortedMap.
Implementations should seek to avoid creating a new object every time this
method is called. See AbstractMap.values() etc. Calling this
method on the inverse map should return the original.
The inverse map returned by inverseBidiMap() should be the
same object as returned by this method.
inverseSortedBidiMap in interface SortedBidiMappublic java.util.Comparator comparator()
comparator in interface java.util.SortedMappublic java.util.SortedMap subMap(java.lang.Object fromKey,
java.lang.Object toKey)
subMap in interface java.util.SortedMappublic java.util.SortedMap headMap(java.lang.Object toKey)
headMap in interface java.util.SortedMappublic java.util.SortedMap tailMap(java.lang.Object fromKey)
tailMap in interface java.util.SortedMapCopyright © 2001-2025 Apache Software Foundation. All Rights Reserved.