java.text
Class AttributedString.AttributeMap
java.lang.Object
java.util.AbstractMap
java.text.AttributedString.AttributeMap
- All Implemented Interfaces:
- Map
- Enclosing class:
- AttributedString
- private final class AttributedString.AttributeMap
- extends AbstractMap
Nested classes inherited from class java.util.AbstractMap |
|
Method Summary |
Set |
entrySet()
Returns a set view of the mappings contained in this map. |
Object |
get(Object key)
Returns the value to which this map maps the specified key. |
Methods inherited from class java.util.AbstractMap |
clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values |
runIndex
int runIndex
beginIndex
int beginIndex
endIndex
int endIndex
AttributedString.AttributeMap
AttributedString.AttributeMap(int runIndex,
int beginIndex,
int endIndex)
entrySet
public Set entrySet()
- Description copied from class:
AbstractMap
- Returns a set view of the mappings contained in this map. Each element
in this set is a Map.Entry. The set is backed by the map, so changes
to the map are reflected in the set, and vice-versa. (If the map is
modified while an iteration over the set is in progress, the results of
the iteration are undefined.) The set supports element removal, which
removes the corresponding entry from the map, via the
Iterator.remove, Set.remove, removeAll,
retainAll and clear operations. It does not support
the add or addAll operations.
- Specified by:
entrySet
in interface Map
- Specified by:
entrySet
in class AbstractMap
- Returns:
- a set view of the mappings contained in this map.
get
public Object get(Object key)
- Description copied from class:
AbstractMap
- Returns the value to which this map maps the specified key. Returns
null if the map contains no mapping for this key. A return
value of null does not necessarily indicate that the
map contains no mapping for the key; it's also possible that the map
explicitly maps the key to null. The containsKey operation
may be used to distinguish these two cases.
This implementation iterates over entrySet() searching for an
entry with the specified key. If such an entry is found, the entry's
value is returned. If the iteration terminates without finding such an
entry, null is returned. Note that this implementation
requires linear time in the size of the map; many implementations will
override this method.
- Specified by:
get
in interface Map
- Overrides:
get
in class AbstractMap
- Parameters:
key
- key whose associated value is to be returned.
- Returns:
- the value to which this map maps the specified key.
- See Also:
AbstractMap.containsKey(Object)