org.apache.torque.util
Class ListOrderedMapCI

java.lang.Object
  extended by org.apache.commons.collections.map.AbstractMapDecorator
      extended by org.apache.commons.collections.map.ListOrderedMap
          extended by org.apache.torque.util.ListOrderedMapCI
All Implemented Interfaces:
java.io.Serializable, java.util.Map, org.apache.commons.collections.IterableMap, org.apache.commons.collections.OrderedMap

public class ListOrderedMapCI
extends org.apache.commons.collections.map.ListOrderedMap

A subclass of the Apache Commons ListOrderedMap that has case insensitive String key methods. This is done by converting all String keys to lower case.

Version:
$Id$
Author:
Greg Monroe
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.apache.commons.collections.map.ListOrderedMap
insertOrder
 
Fields inherited from class org.apache.commons.collections.map.AbstractMapDecorator
map
 
Constructor Summary
ListOrderedMapCI()
          Constructs a new empty ListOrderedMap.
 
Method Summary
 boolean containsKey(java.lang.String key)
          Test if the key exists in the mapping.
 java.lang.Object get(java.lang.String key)
          Get the object associated with this key.
 int indexOf(java.lang.String key)
          Gets the index of the specified key.
 java.lang.Object put(int index, java.lang.String key, java.lang.Object value)
          Puts a key-value mapping into the map at the specified index.
 java.lang.Object put(java.lang.String key, java.lang.Object value)
          Adds a value to the end of the list with the specified key.
 java.lang.Object remove(java.lang.String key)
          Removes the mapping for the specified key.
 
Methods inherited from class org.apache.commons.collections.map.ListOrderedMap
asList, clear, decorate, entrySet, firstKey, get, getValue, indexOf, keyList, keySet, lastKey, mapIterator, nextKey, orderedMapIterator, previousKey, put, put, putAll, remove, remove, setValue, toString, valueList, values
 
Methods inherited from class org.apache.commons.collections.map.AbstractMapDecorator
containsKey, containsValue, equals, get, getMap, hashCode, isEmpty, size
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, containsValue, equals, get, hashCode, isEmpty, size
 

Constructor Detail

ListOrderedMapCI

public ListOrderedMapCI()
Constructs a new empty ListOrderedMap.

Method Detail

get

public java.lang.Object get(java.lang.String key)
Get the object associated with this key.

Parameters:
key - A case insensitive String.
Returns:
The value for this key

put

public java.lang.Object put(java.lang.String key,
                            java.lang.Object value)
Adds a value to the end of the list with the specified key.

Parameters:
key - A case insensitive String.
value - The value to add
Returns:
The value for previously mapped to this key

put

public java.lang.Object put(int index,
                            java.lang.String key,
                            java.lang.Object value)
Puts a key-value mapping into the map at the specified index.

Parameters:
index - The index at which the mapping should be inserted.
key - A case insensitive String.
value - The value.
Returns:
The value for previously mapped to this key

indexOf

public int indexOf(java.lang.String key)
Gets the index of the specified key.

Parameters:
key - A case insensitive String.
Returns:
the index, or -1 if not found

remove

public java.lang.Object remove(java.lang.String key)
Removes the mapping for the specified key.

Parameters:
key - A case insensitive String.
Returns:
the removed value, or null if none existed

containsKey

public boolean containsKey(java.lang.String key)
Test if the key exists in the mapping.

Parameters:
key - The case insensitive key to test for.
Returns:
True if the key exists.


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.