java.lang.Object
jfxtras.icalendarfx.utilities.Pair<K,V>
- All Implemented Interfaces:
Serializable
A convenience class to represent name-value pairs.
Copied from JavaFx for use in Java EE environments- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
key
Key of thisPair. -
value
Value of this thisPair.
-
-
Constructor Details
-
Pair
Creates a new pair- Parameters:
key- The key for this pairvalue- The value to use for this pair
-
-
Method Details
-
getKey
Gets the key for this pair.- Returns:
- key for this pair
-
getValue
Gets the value for this pair.- Returns:
- value for this pair
-
toString
Stringrepresentation of thisPair.The default name/value delimiter '=' is always used.
-
hashCode
public int hashCode()Generate a hash code for this
Pair.The hash code is calculated using both the name and the value of the
Pair. -
equals
Test this
Pairfor equality with anotherObject.If the
Objectto be tested is not aPairor isnull, then this method returnsfalse.Two
Pairs are considered equal if and only if both the names and values are equal.
-