javawebparts.core
Class CaseInsensitiveMap.FakeEntry

java.lang.Object
  |
  +--javawebparts.core.CaseInsensitiveMap.FakeEntry
All Implemented Interfaces:
java.util.Map.Entry
Enclosing class:
CaseInsensitiveMap

private static class CaseInsensitiveMap.FakeEntry
extends java.lang.Object
implements java.util.Map.Entry

Our Map.Entry implementation used in the Set returned by the entrySet() method. This implementation wraps the internal Maps Map.Entry so it can return the original key from the value component of the internal Map.


Field Summary
private  java.util.Map.Entry entry
           
 
Constructor Summary
(package private) CaseInsensitiveMap.FakeEntry(java.util.Map.Entry sourceEntry)
          Constructs a new Entry by wrapping the passed in Map.Entry
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if this Map.Entry is equal to the Object passed in.
 java.lang.Object getKey()
          Returns the key of the entry.
 java.lang.Object getValue()
          Returns the value of the entry.
 int hashCode()
          Returns the hash code of the object.
 java.lang.Object setValue(java.lang.Object newValue)
          Sets the value of the entry.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entry

private java.util.Map.Entry entry
Constructor Detail

CaseInsensitiveMap.FakeEntry

CaseInsensitiveMap.FakeEntry(java.util.Map.Entry sourceEntry)
Constructs a new Entry by wrapping the passed in Map.Entry

Parameters:
sourceEntry - the Map.Entry to be wrapped
Method Detail

getKey

public java.lang.Object getKey()
Returns the key of the entry.

Specified by:
getKey in interface java.util.Map.Entry
Returns:
the key of the entry.

getValue

public java.lang.Object getValue()
Returns the value of the entry.

Specified by:
getValue in interface java.util.Map.Entry
Returns:
the value of the entry.

setValue

public java.lang.Object setValue(java.lang.Object newValue)
Sets the value of the entry.

Specified by:
setValue in interface java.util.Map.Entry
Parameters:
newValue - the new value to be set.
Returns:
the old value of the entry

equals

public boolean equals(java.lang.Object o)
Returns true if this Map.Entry is equal to the Object passed in.

Specified by:
equals in interface java.util.Map.Entry
Overrides:
equals in class java.lang.Object
Parameters:
o - the Object to compare against
Returns:
true if this Map.Entry is equal to the Map.Entry passed in.

hashCode

public int hashCode()
Returns the hash code of the object.

Specified by:
hashCode in interface java.util.Map.Entry
Overrides:
hashCode in class java.lang.Object
Returns:
the hash code of the object


Copyright 2005 Frank W. Zammetti