Package org.apache.jena.util
Class OneToManyMap.Entry<From,To>
java.lang.Object
org.apache.jena.util.OneToManyMap.Entry<From,To>
- All Implemented Interfaces:
Map.Entry<From,
To>
- Enclosing class:
- OneToManyMap<From,
To>
Helper class to implement the Map.Entry interface to enumerate entries in the map
-
Method Summary
-
Method Details
-
equals
Compares the specified object with this entry for equality. Returns true if the given object is also a map entry and the two entries represent the same mapping. More formally, two entries e1 and e2 represent the same mapping if
This ensures that the equals method works properly across different implementations of the Map.Entry interface.(e1.getKey()==null ? e2.getKey()==null : e1.getKey().equals(e2.getKey())) && (e1.getValue()==null ? e2.getValue()==null : e1.getValue().equals(e2.getValue()))
-
getKey
Answer the key for the entry -
getValue
Answer the value for the entry -
setValue
Set the value, which writes through to the map. Not implemented.- Specified by:
setValue
in interfaceMap.Entry<From,
To> - Throws:
UnsupportedOperationException
-
hashCode
public int hashCode()Returns the hash code value for this map entry. The hash code of a map entry e is defined to be: (e.getKey()==null ? 0 : e.getKey().hashCode()) ^ (e.getValue()==null ? 0 : e.getValue().hashCode()) This ensures that e1.equals(e2) implies that e1.hashCode()==e2.hashCode() for any two Entries e1 and e2, as required by the general contract of Object.hashCode.
-