public final class

AttributeMap

extends AbstractMap<K, V>
java.lang.Object
   ↳ java.util.AbstractMap<K, V>
     ↳ sun.font.AttributeMap

Summary

Public Constructors
AttributeMap(AttributeValues values)
Public Methods
Set<Entry<TextAttributeObject>> entrySet()
Returns a Set view of the mappings contained in this map.
AttributeValues getValues()
Object put(TextAttribute key, Object value)
Associates the specified value with the specified key in this map (optional operation).

This implementation always throws an UnsupportedOperationException.

String toString()
Returns a string representation of this map.
[Expand]
Inherited Methods
From class java.util.AbstractMap
From class java.lang.Object
From interface java.util.Map

Public Constructors

public AttributeMap (AttributeValues values)

Public Methods

public Set<Entry<TextAttributeObject>> entrySet ()

Returns a Set view of the mappings contained in this map. 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 (except through the iterator's own remove operation, or through the setValue operation on a map entry returned by the iterator) the results of the iteration are undefined. 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.

Returns
  • a set view of the mappings contained in this map

public AttributeValues getValues ()

public Object put (TextAttribute key, Object value)

Associates the specified value with the specified key in this map (optional operation). If the map previously contained a mapping for the key, the old value is replaced by the specified value. (A map m is said to contain a mapping for a key k if and only if m.containsKey(k) would return true.)

This implementation always throws an UnsupportedOperationException.

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 key, or null if there was no mapping for key. (A null return can also indicate that the map previously associated null with key, if the implementation supports null values.)

public String toString ()

Returns a string representation of this map. The string representation consists of a list of key-value mappings in the order returned by the map's entrySet view's iterator, enclosed in braces ("{}"). Adjacent mappings are separated by the characters ", " (comma and space). Each key-value mapping is rendered as the key followed by an equals sign ("=") followed by the associated value. Keys and values are converted to strings as by valueOf(Object).

Returns
  • a string representation of this map