Class AbstractImmutableEntry<K,V>
- java.lang.Object
-
- org.eclipse.collections.impl.tuple.AbstractImmutableEntry<K,V>
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.Map.Entry<K,V>
- Direct Known Subclasses:
ImmutableEntry
,ImmutableEntryWithHashingStrategy
public class AbstractImmutableEntry<K,V> extends java.lang.Object implements java.util.Map.Entry<K,V>, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
AbstractImmutableEntry.KeyFunction<K>
Deprecated.Since 6.2 - Kept for serialization compatibility only.private static class
AbstractImmutableEntry.PairFunction<K,V>
private static class
AbstractImmutableEntry.ValueFunction<V>
Deprecated.Since 6.2 - Kept for serialization compatibility only.
-
Field Summary
Fields Modifier and Type Field Description protected K
key
private static long
serialVersionUID
private static AbstractImmutableEntry.PairFunction<?,?>
TO_PAIR
protected V
value
-
Constructor Summary
Constructors Constructor Description AbstractImmutableEntry(K key, V value)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description K
getKey()
static <K> Function<java.util.Map.Entry<K,?>,K>
getKeyFunction()
Deprecated.Since 6.2 - UseFunctions.getKeyFunction()
instead.static <K,V>
Function<java.util.Map.Entry<K,V>,Pair<K,V>>getPairFunction()
V
getValue()
static <V> Function<java.util.Map.Entry<?,V>,V>
getValueFunction()
Deprecated.Since 6.2 - UseFunctions.getValueFunction()
instead.V
setValue(V value)
java.lang.String
toString()
Returns a string representation of the form{key}={value}
.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
TO_PAIR
private static final AbstractImmutableEntry.PairFunction<?,?> TO_PAIR
-
key
protected final K key
-
value
protected final V value
-
-
Method Detail
-
getKeyFunction
@Deprecated public static <K> Function<java.util.Map.Entry<K,?>,K> getKeyFunction()
Deprecated.Since 6.2 - UseFunctions.getKeyFunction()
instead.
-
getValueFunction
@Deprecated public static <V> Function<java.util.Map.Entry<?,V>,V> getValueFunction()
Deprecated.Since 6.2 - UseFunctions.getValueFunction()
instead.
-
getPairFunction
public static <K,V> Function<java.util.Map.Entry<K,V>,Pair<K,V>> getPairFunction()
-
setValue
public V setValue(V value)
This implementation throws an
UnsupportedOperationException
. Override this method to support mutable map entries.
-
toString
public java.lang.String toString()
Returns a string representation of the form{key}={value}
.- Overrides:
toString
in classjava.lang.Object
-
-