Package io.github.fastily.jwiki.util
Class Tuple<K,V>
java.lang.Object
io.github.fastily.jwiki.util.Tuple<K,V>
- Type Parameters:
K
- The type of Object allowed for the first Object in the tuple.V
- The type of Object allowed for the second Object in the tuple.
Simple implementation of a Tuple. A Tuple is an immutable paired 2-set of values (e.g. (x, y)), and may consist of
any two Objects (may be in the same class or a different class).
- Author:
- Fastily
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
x
The x value of the tuple -
y
The y value of the tuple
-
-
Constructor Details
-
Tuple
Creates a Tuple from the parameter values.- Parameters:
x
- The x value of the tupley
- The y value of the tuple
-
-
Method Details
-
toString
Gets a String representation of this object. Nice for debugging. -
hashCode
public int hashCode()Gets a hashcode for this object. Good for mapping constructs. -
equals
Determines if two tuples are equal. Equal tuples have the same two elements in the same order.
-