ariba.ui.aribaweb.util
Class AWMap

java.lang.Object
  extended by ariba.util.core.ClassExtension
      extended by ariba.ui.aribaweb.util.AWMap
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
AWMap_AribaHashtable, AWMap_JavaHashtable

public abstract class AWMap
extends ClassExtension

Sample Usage: int index = AWMap.get(someList).indexOf(someList, someObject);


Field Summary
 
Fields inherited from class ariba.util.core.ClassExtension
forClass
 
Constructor Summary
AWMap()
          Creates a new AWMap object.
 
Method Summary
abstract  void clear(java.lang.Object receiver)
          Removes all mappings from the given map.
abstract  boolean containsKey(java.lang.Object receiver, java.lang.Object key)
          Returns true if the given map contains a mapping for the specified key.
abstract  boolean containsValue(java.lang.Object receiver, java.lang.Object value)
          Returns true if the given map maps one or more keys to the specified value.
static AWMap get(java.lang.Class targetClass)
          Gets the AWMap class extension for the given class.
static AWMap get(java.lang.Object receiver)
          Gets the AWMap class extension for the given object.
abstract  java.lang.Object get(java.lang.Object receiver, java.lang.Object key)
          Returns the value to which the given map maps the specified key.
abstract  boolean isEmpty(java.lang.Object receiver)
          Returns true if the map contains no key-value mappings.
abstract  java.util.Iterator keys(java.lang.Object receiver)
          Returns an enumeration of the keys in the map.
abstract  java.lang.Object put(java.lang.Object receiver, java.lang.Object key, java.lang.Object value)
          Associates the specified value with the specified key in the map.
static void registerClassExtension(java.lang.Class receiverClass, AWMap mapClassExtension)
          Registers the AWMap class extension for the given class.
abstract  java.lang.Object remove(java.lang.Object receiver, java.lang.Object key)
          Removes the mapping for this key from this map if present.
abstract  int size(java.lang.Object receiver)
          Returns the number of key-value mappings in the map.
abstract  java.util.Iterator values(java.lang.Object receiver)
          Returns an enumeration of the values contained in the map.
 
Methods inherited from class ariba.util.core.ClassExtension
clone, forClass, getRealClass, setForClass
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWMap

public AWMap()
Creates a new AWMap object.

Method Detail

registerClassExtension

public static void registerClassExtension(java.lang.Class receiverClass,
                                          AWMap mapClassExtension)
Registers the AWMap class extension for the given class.

Parameters:
receiverClass - class
mapClassExtension - AWMap class extension

get

public static AWMap get(java.lang.Object receiver)
Gets the AWMap class extension for the given object.

Parameters:
receiver - object
Returns:
AWMap for object

get

public static AWMap get(java.lang.Class targetClass)
Gets the AWMap class extension for the given class.

Parameters:
targetClass - class
Returns:
AWMap for class

clear

public abstract void clear(java.lang.Object receiver)
Removes all mappings from the given map.

Parameters:
receiver - map implementation

containsKey

public abstract boolean containsKey(java.lang.Object receiver,
                                    java.lang.Object key)
Returns true if the given map contains a mapping for the specified key.

Parameters:
receiver - map implementation
key - key whose presence in map is to be tested

containsValue

public abstract boolean containsValue(java.lang.Object receiver,
                                      java.lang.Object value)
Returns true if the given map maps one or more keys to the specified value. More formally, returns true if and only if this map contains at least one mapping to a value v such that (value==null ? v==null : value.equals(v)).

Parameters:
receiver - map implementation
value - value whose presence in map is to be tested
Returns:
true if map maps one or more keys to the specified value

get

public abstract java.lang.Object get(java.lang.Object receiver,
                                     java.lang.Object key)
Returns the value to which the given map maps the specified key. Returns null if the map contains no mapping for this key.

Parameters:
receiver - map implementation
key - key whose associated value is to be returned
Returns:
value to which map maps the specified key, or null if the map contains no mapping for this key

isEmpty

public abstract boolean isEmpty(java.lang.Object receiver)
Returns true if the map contains no key-value mappings.

Parameters:
receiver - map implementation
Returns:
true if map contains no key-value mappings

keys

public abstract java.util.Iterator keys(java.lang.Object receiver)
Returns an enumeration of the keys in the map.

Parameters:
receiver - map implementation
Returns:
enumeration of the keys in the map

put

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

Parameters:
receiver - map implementation
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

remove

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

Parameters:
receiver - map implementation
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

size

public abstract int size(java.lang.Object receiver)
Returns the number of key-value mappings in the map.

Parameters:
receiver - map implementation
Returns:
number of key-value mappings in map

values

public abstract java.util.Iterator values(java.lang.Object receiver)
Returns an enumeration of the values contained in the map.

Parameters:
receiver - map implementation
Returns:
an enumeration of the values contained in the map


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.