Package edu.uky.ai.util
Class Tuple
java.lang.Object
edu.uky.ai.util.Tuple
A tuple is simply an array of
Object
s implemented such that two
tuples are the same (i.e. Object#equals(Object)
) if their
arrays contain values which are equal. Tuples can, for example, be use as
multi-valued keys to HashMap
s.- Author:
- Stephen G. Ware
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
elements
The array of objects in the tuple
-
-
Constructor Details
-
Tuple
Constructs a tuple from a given set of objects.- Parameters:
elements
- the objects
-
Tuple
public Tuple(int size) Constructs a tuple of a given size with each element as null.- Parameters:
size
- the size of the tuple
-
-
Method Details