info.monitorenter.util.collections
Class Entry<V,K>
- java.lang.Object
-
- info.monitorenter.util.collections.Entry<V,K>
-
- Type Parameters:
V- the key type.K- the value type.
- All Implemented Interfaces:
- java.util.Map.Entry<V,K>
public final class Entry<V,K> extends java.lang.Object implements java.util.Map.Entry<V,K>I have written implementations of java.util.Map.Entry in form of
- Static inner classes.
- Non-static inner classes.
- Non-public classes.
- Anonymous classes.
Almost all implementations were plainforward and not hiding any complexity. One could not downcast them to get more methods, and they were replaceable.
That's it! Finally i decided to hardcode it here... .But don't you start writing methods like:
public Entry getEntry(String name); public void setEntry(Entry entry);
Try sticking to the interface java.util.Map.Entry.- See Also:
Map.Entry
-
-
Constructor Summary
Constructors Constructor and Description Entry(V key, K value)Creates an instance with the given key and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object obj)VgetKey()Maybe null!KgetValue()Maybe null!inthashCode()KsetValue(K value)Sets a new value instance overwriting the old value which is returned.
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
-
getKey
public V getKey()
Maybe null!
-
getValue
public K getValue()
Maybe null!
-
hashCode
public int hashCode()
-
-
DMelt 3.0 © DataMelt by jWork.ORG