com.vinculumtech.carrierwave.image.util
Class ImageHashMap

java.lang.Object
  extended byjava.util.AbstractMap
      extended bycom.vinculumtech.carrierwave.image.util.ImageHashMap
All Implemented Interfaces:
ImageContainer, java.util.Map, java.io.Serializable

public class ImageHashMap
extends java.util.AbstractMap
implements ImageContainer, java.io.Serializable

Version:
$Id: //depot/carrierwave/src/shared/com/vinculumtech/carrierwave/image/util/ImageHashMap.java#6 $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Constructor Summary
ImageHashMap(Image parent)
           
ImageHashMap(Image parent, java.lang.String edge)
           
ImageHashMap(Image parent, java.lang.String edge, java.util.Map iconMap)
           
 
Method Summary
 void clear()
          Removes all mappings from this map.
 boolean containsValue(java.lang.Object value)
          Returns true if this map maps one or more keys to the specified value.
 java.util.Set entrySet()
          Returns a set view of the mappings contained in this map.
 java.lang.Object get(java.lang.Object key)
          Returns the value to which this map maps the specified key.
 java.lang.String getEdge()
           
 Icon getIcon(java.lang.Object key)
           
 java.util.Map getIconMap()
           
 java.lang.Object getIcons()
           
protected  ImageGraph getImageGraph()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Associates the specified value with the specified key in this map.
 void putAll(java.util.Map t)
          Copies all of the mappings from the specified map to this one.
 java.lang.Object remove(java.lang.Object key)
          Removes the mapping for this key from this map if present.
 java.util.Collection values()
          Returns a collection view of the values contained in this map.
 
Methods inherited from class java.util.AbstractMap
clone, containsKey, equals, hashCode, isEmpty, keySet, size, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImageHashMap

public ImageHashMap(Image parent,
                    java.lang.String edge)

ImageHashMap

public ImageHashMap(Image parent,
                    java.lang.String edge,
                    java.util.Map iconMap)

ImageHashMap

public ImageHashMap(Image parent)
Method Detail

getImageGraph

protected ImageGraph getImageGraph()

getEdge

public java.lang.String getEdge()
Specified by:
getEdge in interface ImageContainer

getIconMap

public java.util.Map getIconMap()

getIcons

public java.lang.Object getIcons()
Specified by:
getIcons in interface ImageContainer

containsValue

public boolean containsValue(java.lang.Object value)
Returns true if this map maps one or more keys to the specified value.

Specified by:
containsValue in interface java.util.Map
Parameters:
value - value whose presence in this map is to be tested.
Returns:
true if this map maps one or more keys to the specified value.

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.

Specified by:
put in interface java.util.Map
Parameters:
key - key with which the specified value is to be associated.
value - value to be associated with the specified key.
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the HashMap previously associated null with the specified key.

get

public java.lang.Object get(java.lang.Object key)
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.

Specified by:
get in interface java.util.Map
Parameters:
key - key whose associated value is to be returned.
Returns:
the value to which this map maps the specified key.

getIcon

public Icon getIcon(java.lang.Object key)

remove

public java.lang.Object remove(java.lang.Object key)
Removes the mapping for this key from this map if present.

Specified by:
remove in interface java.util.Map
Parameters:
key - key whose mapping is to be removed from the map.
Returns:
previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key.

putAll

public void putAll(java.util.Map t)
Copies all of the mappings from the specified map to this one. These mappings replace any mappings that this map had for any of the keys currently in the specified Map.

Specified by:
putAll in interface java.util.Map
Parameters:
t - Mappings to be stored in this map.

values

public java.util.Collection values()
Returns a collection view of the values contained in this map. 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 this map, via the Iterator.remove, Collection.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.

Specified by:
values in interface java.util.Map
Returns:
a collection view of the values contained in this map.

clear

public void clear()
Removes all mappings from this map.

Specified by:
clear in interface java.util.Map

entrySet

public java.util.Set entrySet()
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 java.util.Map
Returns:
a set view of the mappings contained in this map.


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.