|
FlexDoc/Javadoc 2.0 Demo Java Doc |
Class ConcurrentSkipListMap<K,V>
java.util.concurrent.ConcurrentSkipListMap<K,V>
Type Parameters:
K - the type of keys maintained by this map
V - the type of mapped values
All Implemented Interfaces:
Serializable,
Cloneable,
ConcurrentMap<
K,
V>,
ConcurrentNavigableMap<
K,
V>,
Map<
K,
V>,
NavigableMap<
K,
V>,
SortedMap<
K,
V>
public class ConcurrentSkipListMap<K,V>
A scalable concurrent
ConcurrentNavigableMap implementation.
The map is sorted according to the
natural
ordering of its keys, or by a
Comparator provided at map
creation time, depending on which constructor is used.
This class implements a concurrent variant of SkipLists
providing expected average log(n) time cost for the
containsKey, get, put and
remove operations and their variants. Insertion, removal,
update, and access operations safely execute concurrently by
multiple threads.
Iterators and spliterators are
weakly consistent.
Ascending key ordered views and their iterators are faster than
descending ones.
All Map.Entry pairs returned by methods in this class
and its views represent snapshots of mappings at the time they were
produced. They do not support the Entry.setValue
method. (Note however that it is possible to change mappings in the
associated map using put, putIfAbsent, or
replace, depending on exactly which effect you need.)
Beware that bulk operations putAll, equals,
toArray, containsValue, and clear are
not guaranteed to be performed atomically. For example, an
iterator operating concurrently with a putAll operation
might view only some of the added elements.
This class and its views and iterators implement all of the
optional methods of the Map and Iterator
interfaces. Like most other concurrent collections, this class does
not permit the use of null keys or values because some
null return values cannot be reliably distinguished from the absence of
elements.
This class is a member of the
Java Collections Framework.
Since:
1.6
Author:
Doug Lea
See Also:
Nested classes/interfaces inherited from class java.util. AbstractMap |
|
Nested classes/interfaces inherited from interface java.util. Map |
|
Constructor Summary |
Constructs a new, empty map, sorted according to the
natural ordering of the keys.
|
Constructs a new, empty map, sorted according to the specified
comparator.
|
Constructs a new map containing the same mappings as the given map,
sorted according to the natural ordering of
the keys.
|
Constructs a new map containing the same mappings and using the
same ordering as the specified sorted map.
|
Method Summary |
|
Returns a key-value mapping associated with the least key
greater than or equal to the given key, or null if
there is no such entry.
|
|
Returns the least key greater than or equal to the given key,
or null if there is no such key.
|
void |
Removes all of the mappings from this map.
|
|
Returns a shallow copy of this ConcurrentSkipListMap
instance.
|
|
Returns the comparator used to order the keys in this map, or
null if this map uses the natural ordering of its keys.
|
|
Attempts to compute a mapping for the specified key and its
current mapped value (or null if there is no current
mapping).
|
|
If the specified key is not already associated with a value,
attempts to compute its value using the given mapping function
and enters it into this map unless null.
|
|
If the value for the specified key is present, attempts to
compute a new mapping given the key and its current mapped
value.
|
boolean |
Returns true if this map contains a mapping for the specified
key.
|
boolean |
Returns true if this map maps one or more keys to the
specified value.
|
|
Returns a reverse order NavigableSet view of the keys contained in this map.
|
|
Returns a reverse order view of the mappings contained in this map.
|
|
Returns a Set view of the mappings contained in this map.
|
boolean |
Compares the specified object with this map for equality.
|
|
Returns a key-value mapping associated with the least
key in this map, or null if the map is empty.
|
|
Returns the first (lowest) key currently in this map.
|
|
Returns a key-value mapping associated with the greatest key
less than or equal to the given key, or null if there
is no such key.
|
|
Returns the greatest key less than or equal to the given key,
or null if there is no such key.
|
void |
Performs the given action for each entry in this map until all entries
have been processed or the action throws an exception.
|
|
Returns the value to which the specified key is mapped,
or null if this map contains no mapping for the key.
|
|
Returns the value to which the specified key is mapped,
or the given defaultValue if this map contains no mapping for the key.
|
|
Returns a view of the portion of this map whose keys are
strictly less than toKey.
|
|
Returns a view of the portion of this map whose keys are less than (or
equal to, if inclusive is true) toKey.
|
|
Returns a key-value mapping associated with the least key
strictly greater than the given key, or null if there
is no such key.
|
|
Returns the least key strictly greater than the given key, or
null if there is no such key.
|
boolean |
Returns true if this map contains no key-value mappings.
|
|
Returns a NavigableSet view of the keys contained in this map.
|
|
Returns a key-value mapping associated with the greatest
key in this map, or null if the map is empty.
|
|
Returns the last (highest) key currently in this map.
|
|
Returns a key-value mapping associated with the greatest key
strictly less than the given key, or null if there is
no such key.
|
|
Returns the greatest key strictly less than the given key, or
null if there is no such key.
|
|
If the specified key is not already associated with a value,
associates it with the given value.
|
|
Returns a NavigableSet view of the keys contained in this map.
|
|
Removes and returns a key-value mapping associated with
the least key in this map, or null if the map is empty.
|
|
Removes and returns a key-value mapping associated with
the greatest key in this map, or null if the map is empty.
|
|
Associates the specified value with the specified key in this map.
|
|
If the specified key is not already associated with a value (or is mapped
to null) associates it with the given value and returns
null, else returns the current value.
|
|
Removes the mapping for the specified key from this map if present.
|
boolean |
Removes the entry for the specified key only if it is currently
mapped to the specified value.
|
|
Replaces the entry for the specified key only if it is
currently mapped to some value.
|
boolean |
Replaces the entry for the specified key only if currently
mapped to the specified value.
|
void |
Replaces each entry's value with the result of invoking the given
function on that entry until all entries have been processed or the
function throws an exception.
|
int |
Returns the number of key-value mappings in this map.
|
|
subMap( K fromKey, boolean fromInclusive, K toKey, boolean toInclusive)
Returns a view of the portion of this map whose keys range from
fromKey to toKey.
|
|
Returns a view of the portion of this map whose keys range from
fromKey, inclusive, to toKey, exclusive.
|
|
Returns a view of the portion of this map whose keys are
greater than or equal to fromKey.
|
|
Returns a view of the portion of this map whose keys are greater than (or
equal to, if inclusive is true) fromKey.
|
|
Returns a Collection view of the values contained in this map.
|
Methods inherited from class java.lang. Object |
|
Methods inherited from interface java.util. Map |
copyOf, entry, of, of, of, of, of, of, of, of, of, of, of, ofEntries |
public ConcurrentSkipListMap |
() |
Constructs a new, empty map, sorted according to the
natural ordering of the keys.
public ConcurrentSkipListMap |
|
Constructs a new, empty map, sorted according to the specified
comparator.
Parameters:
comparator - the comparator that will be used to order this map.
If
null, the
natural
ordering of the keys will be used.
public ConcurrentSkipListMap |
( Map<? extends K,? extends V> m) |
Constructs a new map containing the same mappings as the given map,
sorted according to the
natural ordering of
the keys.
Parameters:
m - the map whose mappings are to be placed in this map
Throws:
public ConcurrentSkipListMap |
|
Constructs a new map containing the same mappings and using the
same ordering as the specified sorted map.
Parameters:
m - the sorted map whose mappings are to be placed in this
map, and whose comparator is to be used to sort this map
Throws:
Returns a shallow copy of this
ConcurrentSkipListMap
instance. (The keys and values themselves are not cloned.)
Overrides:
Returns:
a shallow copy of this map
See Also:
public boolean containsKey |
|
Returns
true if this map contains a mapping for the specified
key.
Specified by:
Overrides:
Parameters:
key - key whose presence in this map is to be tested
Returns:
true if this map contains a mapping for the specified key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Returns the value to which the specified key is mapped,
or
null if this map contains no mapping for the key.
More formally, if this map contains a mapping from a key
k to a value v such that key compares
equal to k according to the map's ordering, then this
method returns v; otherwise it returns null.
(There can be at most one such mapping.)
Specified by:
Overrides:
Parameters:
key - the key whose associated value is to be returned
Returns:
the value to which the specified key is mapped, or
null if this map contains no mapping for the key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Returns the value to which the specified key is mapped,
or the given defaultValue if this map contains no mapping for the key.
Specified by:
Parameters:
key - the key
defaultValue - the value to return if this map contains
no mapping for the given key
Returns:
the mapping for the key, if present; else the defaultValue
Throws:
Since:
1.8
Associates the specified value with the specified key in this map.
If the map previously contained a mapping for the key, the old
value is replaced.
Specified by:
Overrides:
Parameters:
key - key with which the specified value is to be associated
value - value to be associated with the specified key
Returns:
the previous value associated with the specified key, or
null if there was no mapping for the key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Removes the mapping for the specified key from this map if present.
Specified by:
Overrides:
Parameters:
key - key for which mapping should be removed
Returns:
the previous value associated with the specified key, or
null if there was no mapping for the key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
public boolean containsValue |
|
Returns
true if this map maps one or more keys to the
specified value. This operation requires time linear in the
map size. Additionally, it is possible for the map to change
during execution of this method, in which case the returned
result may be inaccurate.
Specified by:
Overrides:
Parameters:
value - value whose presence in this map is to be tested
Returns:
true if a mapping to value exists;
false otherwise
Throws:
Returns the number of key-value mappings in this map. If the
map contains more than
Integer.MAX_VALUE elements, returns
Integer.MAX_VALUE.
Specified by:
Overrides:
Returns:
the number of key-value mappings in this map
public boolean isEmpty |
() |
Returns
true if this map contains no key-value mappings.
Specified by:
Overrides:
Returns:
true if this map contains no key-value mappings
Removes all of the mappings from this map.
Specified by:
Overrides:
|
( K key, Function<? super K,? extends V> mappingFunction) |
If the specified key is not already associated with a value,
attempts to compute its value using the given mapping function
and enters it into this map unless
null. The function
is
NOT guaranteed to be applied once atomically only
if the value is not present.
Specified by:
Parameters:
key - key with which the specified value is to be associated
mappingFunction - the function to compute a value
Returns:
the current (existing or computed) value associated with
the specified key, or null if the computed value is null
Throws:
Since:
1.8
public V computeIfPresent |
( K key, BiFunction<? super K,? super V,? extends V> remappingFunction) |
If the value for the specified key is present, attempts to
compute a new mapping given the key and its current mapped
value. The function is
NOT guaranteed to be applied
once atomically.
Specified by:
Parameters:
key - key with which a value may be associated
remappingFunction - the function to compute a value
Returns:
the new value associated with the specified key, or null if none
Throws:
Since:
1.8
|
( K key, BiFunction<? super K,? super V,? extends V> remappingFunction) |
Attempts to compute a mapping for the specified key and its
current mapped value (or
null if there is no current
mapping). The function is
NOT guaranteed to be applied
once atomically.
Specified by:
Parameters:
key - key with which the specified value is to be associated
remappingFunction - the function to compute a value
Returns:
the new value associated with the specified key, or null if none
Throws:
Since:
1.8
|
( K key, V value, BiFunction<? super V,? super V,? extends V> remappingFunction) |
If the specified key is not already associated with a value,
associates it with the given value. Otherwise, replaces the
value with the results of the given remapping function, or
removes if
null. The function is
NOT
guaranteed to be applied once atomically.
Specified by:
Parameters:
key - key with which the specified value is to be associated
value - the value to use if absent
remappingFunction - the function to recompute a value if present
Returns:
the new value associated with the specified key, or null if none
Throws:
Since:
1.8
Returns a
NavigableSet view of the keys contained in this map.
The set's iterator returns the keys in ascending order.
The set's spliterator additionally reports Spliterator.CONCURRENT,
Spliterator.NONNULL, Spliterator.SORTED and
Spliterator.ORDERED, with an encounter order that is ascending
key order.
The spliterator's comparator
is null if the map's comparator
is null.
Otherwise, the spliterator's comparator is the same as or imposes the
same total ordering as the map's comparator.
The set is backed by the map, so changes to the map are
reflected in the set, and vice-versa. The set supports element
removal, which removes the corresponding mapping from the map,
via the Iterator.remove, Set.remove,
removeAll, retainAll, and clear
operations. It does not support the add or addAll
operations.
The view's iterators and spliterators are
weakly consistent.
This method is equivalent to method navigableKeySet.
Specified by:
Overrides:
Returns:
a navigable set view of the keys in this map
Returns a
NavigableSet view of the keys contained in this map.
The set's iterator returns the keys in ascending order.
The set is backed by the map, so changes to the map are
reflected in the set, and vice-versa. The set supports element
removal, which removes the corresponding mapping from the map,
via the
Iterator.remove,
Set.remove,
removeAll,
retainAll, and
clear
operations. It does not support the
add or
addAll
operations.
The view's iterators and spliterators are
weakly consistent.
Specified by:
Returns:
a navigable set view of the keys in this map
Returns a
Collection view of the values contained in this map.
The collection's iterator returns the values in ascending order
of the corresponding keys. The collections's spliterator additionally
reports Spliterator.CONCURRENT, Spliterator.NONNULL and
Spliterator.ORDERED, with an encounter order that is ascending
order of the corresponding keys.
The collection is backed by the map, so changes to the map are
reflected in the collection, and vice-versa. The collection
supports element removal, which removes the corresponding
mapping from the map, via the Iterator.remove,
Collection.remove, removeAll,
retainAll and clear operations. It does not
support the add or addAll operations.
The view's iterators and spliterators are
weakly consistent.
Specified by:
Overrides:
Returns:
a collection view of the values contained in this map
Returns a
Set view of the mappings contained in this map.
The set's iterator returns the entries in ascending key order. The
set's spliterator additionally reports Spliterator.CONCURRENT,
Spliterator.NONNULL, Spliterator.SORTED and
Spliterator.ORDERED, with an encounter order that is ascending
key order.
The set is backed by the map, so changes to the map are
reflected in the set, and vice-versa. The set supports element
removal, which removes the corresponding mapping from the map,
via the Iterator.remove, Set.remove,
removeAll, retainAll and clear
operations. It does not support the add or
addAll operations.
The view's iterators and spliterators are
weakly consistent.
The Map.Entry elements traversed by the iterator
or spliterator do not support the setValue
operation.
Specified by:
Overrides:
Returns:
a set view of the mappings contained in this map,
sorted in ascending key order
Returns a reverse order view of the mappings contained in this map.
The descending map is backed by this map, so changes to the map are
reflected in the descending map, and vice-versa.
The returned map has an ordering equivalent to
Collections.reverseOrder(comparator()).
The expression m.descendingMap().descendingMap() returns a
view of m essentially equivalent to m.
Specified by:
Returns:
a reverse order view of this map
Returns a reverse order
NavigableSet view of the keys contained in this map.
The set's iterator returns the keys in descending order.
The set is backed by the map, so changes to the map are
reflected in the set, and vice-versa. The set supports element
removal, which removes the corresponding mapping from the map,
via the
Iterator.remove,
Set.remove,
removeAll,
retainAll, and
clear
operations. It does not support the
add or
addAll
operations.
The view's iterators and spliterators are
weakly consistent.
Specified by:
Returns:
a reverse order navigable set view of the keys in this map
Compares the specified object with this map for equality.
Returns
true if the given object is also a map and the
two maps represent the same mappings. More formally, two maps
m1 and
m2 represent the same mappings if
m1.entrySet().equals(m2.entrySet()). This
operation may return misleading results if either map is
concurrently modified during execution of this method.
Specified by:
Overrides:
Parameters:
o - object to be compared for equality with this map
Returns:
true if the specified object is equal to this map
See Also:
If the specified key is not already associated with a value (or is mapped
to
null) associates it with the given value and returns
null, else returns the current value.
Specified by:
Parameters:
key - key with which the specified value is to be associated
value - value to be associated with the specified key
Returns:
the previous value associated with the specified key,
or null if there was no mapping for the key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Removes the entry for the specified key only if it is currently
mapped to the specified value.
Specified by:
Parameters:
key - key with which the specified value is associated
value - value expected to be associated with the specified key
Returns:
true if the value was removed
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
public boolean replace |
( K key, V oldValue, V newValue) |
Replaces the entry for the specified key only if currently
mapped to the specified value.
Specified by:
Parameters:
key - key with which the specified value is associated
oldValue - value expected to be associated with the specified key
newValue - value to be associated with the specified key
Returns:
true if the value was replaced
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Replaces the entry for the specified key only if it is
currently mapped to some value.
Specified by:
Parameters:
key - key with which the specified value is associated
value - value to be associated with the specified key
Returns:
the previous value associated with the specified key,
or null if there was no mapping for the key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Returns the comparator used to order the keys in this map, or
null if this map uses the
natural ordering of its keys.
Specified by:
Returns:
the comparator used to order the keys in this map,
or null if this map uses the natural ordering
of its keys
Returns the first (lowest) key currently in this map.
Specified by:
Returns:
the first (lowest) key currently in this map
Throws:
Returns the last (highest) key currently in this map.
Specified by:
Returns:
the last (highest) key currently in this map
Throws:
|
( K fromKey, boolean fromInclusive, K toKey, boolean toInclusive) |
Returns a view of the portion of this map whose keys range from
fromKey to
toKey. If
fromKey and
toKey are equal, the returned map is empty unless
fromInclusive and
toInclusive are both true. The
returned map is backed by this map, so changes in the returned map are
reflected in this map, and vice-versa. The returned map supports all
optional map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside of its range, or to construct a
submap either of whose endpoints lie outside its range.
Specified by:
Parameters:
fromKey - low endpoint of the keys in the returned map
fromInclusive - true if the low endpoint
is to be included in the returned view
toKey - high endpoint of the keys in the returned map
toInclusive - true if the high endpoint
is to be included in the returned view
Returns:
a view of the portion of this map whose keys range from
fromKey to toKey
Throws:
ClassCastException - if
fromKey and
toKey
cannot be compared to one another using this map's comparator
(or, if the map has no comparator, using natural ordering).
Implementations may, but are not required to, throw this
exception if
fromKey or
toKey
cannot be compared to keys currently in the map.
IllegalArgumentException - if
fromKey is greater than
toKey; or if this map itself has a restricted
range, and
fromKey or
toKey lies
outside the bounds of the range
|
( K toKey, boolean inclusive) |
Returns a view of the portion of this map whose keys are less than (or
equal to, if
inclusive is true)
toKey. The returned
map is backed by this map, so changes in the returned map are reflected
in this map, and vice-versa. The returned map supports all optional
map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
Specified by:
Parameters:
toKey - high endpoint of the keys in the returned map
inclusive - true if the high endpoint
is to be included in the returned view
Returns:
a view of the portion of this map whose keys are less than
(or equal to, if inclusive is true) toKey
Throws:
ClassCastException - if
toKey is not compatible
with this map's comparator (or, if the map has no comparator,
if
toKey does not implement
Comparable).
Implementations may, but are not required to, throw this
exception if
toKey cannot be compared to keys
currently in the map.
|
( K fromKey, boolean inclusive) |
Returns a view of the portion of this map whose keys are greater than (or
equal to, if
inclusive is true)
fromKey. The returned
map is backed by this map, so changes in the returned map are reflected
in this map, and vice-versa. The returned map supports all optional
map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
Specified by:
Parameters:
fromKey - low endpoint of the keys in the returned map
inclusive - true if the low endpoint
is to be included in the returned view
Returns:
a view of the portion of this map whose keys are greater than
(or equal to, if inclusive is true) fromKey
Throws:
ClassCastException - if
fromKey is not compatible
with this map's comparator (or, if the map has no comparator,
if
fromKey does not implement
Comparable).
Implementations may, but are not required to, throw this
exception if
fromKey cannot be compared to keys
currently in the map.
Returns a view of the portion of this map whose keys range from
fromKey, inclusive, to
toKey, exclusive. (If
fromKey and
toKey are equal, the returned map
is empty.) The returned map is backed by this map, so changes
in the returned map are reflected in this map, and vice-versa.
The returned map supports all optional map operations that this
map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
Equivalent to subMap(fromKey, true, toKey, false).
Specified by:
Parameters:
fromKey - low endpoint (inclusive) of the keys in the returned map
toKey - high endpoint (exclusive) of the keys in the returned map
Returns:
a view of the portion of this map whose keys range from
fromKey, inclusive, to toKey, exclusive
Throws:
ClassCastException - if
fromKey and
toKey
cannot be compared to one another using this map's comparator
(or, if the map has no comparator, using natural ordering).
Implementations may, but are not required to, throw this
exception if
fromKey or
toKey
cannot be compared to keys currently in the map.
IllegalArgumentException - if
fromKey is greater than
toKey; or if this map itself has a restricted
range, and
fromKey or
toKey lies
outside the bounds of the range
Returns a view of the portion of this map whose keys are
strictly less than
toKey. The returned map is backed
by this map, so changes in the returned map are reflected in
this map, and vice-versa. The returned map supports all
optional map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
Equivalent to headMap(toKey, false).
Specified by:
Parameters:
toKey - high endpoint (exclusive) of the keys in the returned map
Returns:
a view of the portion of this map whose keys are strictly
less than toKey
Throws:
ClassCastException - if
toKey is not compatible
with this map's comparator (or, if the map has no comparator,
if
toKey does not implement
Comparable).
Implementations may, but are not required to, throw this
exception if
toKey cannot be compared to keys
currently in the map.
Returns a view of the portion of this map whose keys are
greater than or equal to
fromKey. The returned map is
backed by this map, so changes in the returned map are
reflected in this map, and vice-versa. The returned map
supports all optional map operations that this map supports.
The returned map will throw an IllegalArgumentException
on an attempt to insert a key outside its range.
Equivalent to tailMap(fromKey, true).
Specified by:
Parameters:
fromKey - low endpoint (inclusive) of the keys in the returned map
Returns:
a view of the portion of this map whose keys are greater
than or equal to fromKey
Throws:
ClassCastException - if
fromKey is not compatible
with this map's comparator (or, if the map has no comparator,
if
fromKey does not implement
Comparable).
Implementations may, but are not required to, throw this
exception if
fromKey cannot be compared to keys
currently in the map.
Returns a key-value mapping associated with the greatest key
strictly less than the given key, or
null if there is
no such key. The returned entry does
not support the
Entry.setValue method.
Specified by:
Parameters:
key - the key
Returns:
an entry with the greatest key less than key,
or null if there is no such key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Returns the greatest key strictly less than the given key, or
null if there is no such key.
Specified by:
Parameters:
key - the key
Returns:
the greatest key less than key,
or null if there is no such key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Returns a key-value mapping associated with the greatest key
less than or equal to the given key, or
null if there
is no such key. The returned entry does
not support
the
Entry.setValue method.
Specified by:
Parameters:
key - the key
Returns:
an entry with the greatest key less than or equal to
key, or null if there is no such key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Returns the greatest key less than or equal to the given key,
or null if there is no such key.
Specified by:
Parameters:
key - the key
Returns:
the greatest key less than or equal to key,
or null if there is no such key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Returns a key-value mapping associated with the least key
greater than or equal to the given key, or
null if
there is no such entry. The returned entry does
not
support the
Entry.setValue method.
Specified by:
Parameters:
key - the key
Returns:
an entry with the least key greater than or equal to
key, or null if there is no such key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Returns the least key greater than or equal to the given key,
or null if there is no such key.
Specified by:
Parameters:
key - the key
Returns:
the least key greater than or equal to key,
or null if there is no such key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Returns a key-value mapping associated with the least key
strictly greater than the given key, or
null if there
is no such key. The returned entry does
not support
the
Entry.setValue method.
Specified by:
Parameters:
key - the key
Returns:
an entry with the least key greater than key,
or null if there is no such key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Returns the least key strictly greater than the given key, or
null if there is no such key.
Specified by:
Parameters:
key - the key
Returns:
the least key greater than key,
or null if there is no such key
Throws:
ClassCastException - if the specified key cannot be compared
with the keys currently in the map
Returns a key-value mapping associated with the least
key in this map, or
null if the map is empty.
The returned entry does
not support
the
Entry.setValue method.
Specified by:
Returns:
an entry with the least key,
or null if this map is empty
Returns a key-value mapping associated with the greatest
key in this map, or
null if the map is empty.
The returned entry does
not support
the
Entry.setValue method.
Specified by:
Returns:
an entry with the greatest key,
or null if this map is empty
Removes and returns a key-value mapping associated with
the least key in this map, or
null if the map is empty.
The returned entry does
not support
the
Entry.setValue method.
Specified by:
Returns:
the removed first entry of this map,
or null if this map is empty
Removes and returns a key-value mapping associated with
the greatest key in this map, or
null if the map is empty.
The returned entry does
not support
the
Entry.setValue method.
Specified by:
Returns:
the removed last entry of this map,
or null if this map is empty
Description copied from interface:
Map
Performs the given action for each entry in this map until all entries
have been processed or the action throws an exception. Unless
otherwise specified by the implementing class, actions are performed in
the order of entry set iteration (if an iteration order is specified.)
Exceptions thrown by the action are relayed to the caller.
Specified by:
Parameters:
action - The action to be performed for each entry
Description copied from interface:
Map
Replaces each entry's value with the result of invoking the given
function on that entry until all entries have been processed or the
function throws an exception. Exceptions thrown by the function are
relayed to the caller.
Specified by:
Parameters:
function - the function to apply to each entry
|
FlexDoc/Javadoc 2.0 Demo Java Doc |
FlexDoc/Javadoc is a template-driven programming tool for rapid development of any Javadoc-based Java API documentation generators (i.e. doclets). If you need to customize your Javadoc without writing a full-blown doclet from scratch,
FlexDoc/Javadoc may be the only tool able to help you! Find out more at
www.flexdoc.xyz