Package org.assertj.core.data
Class MapEntry<K,V>
- java.lang.Object
-
- org.assertj.core.data.MapEntry<K,V>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <K,V>
MapEntry<K,V>entry(K key, V value)
Creates a newMapEntry
.boolean
equals(Object object)
K
getKey()
V
getValue()
int
hashCode()
V
setValue(V value)
Always throwsUnsupportedOperationException
as this class represents an immutable map entry.String
toString()
-
-
-
Method Detail
-
entry
public static <K,V> MapEntry<K,V> entry(K key, V value)
Creates a newMapEntry
.- Type Parameters:
K
- the type of the key of this entry.V
- the type of the value of this entry.- Parameters:
key
- the key of the entry to create.value
- the value of the entry to create.- Returns:
- the created
MapEntry
.
-
equals
public boolean equals(Object object)
-
hashCode
public int hashCode()
-
setValue
public V setValue(V value)
Always throwsUnsupportedOperationException
as this class represents an immutable map entry.- Specified by:
setValue
in interfaceMap.Entry<K,V>
- Parameters:
value
- ignored- Returns:
- (Does not return)
- Throws:
UnsupportedOperationException
- always
-
-