public class Tuple
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Hashtable
,
Object.hashCode()
,
Object.equals(Object)
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected java.lang.Object[] |
entities
The entities of the tuple.
|
Constructor and Description |
---|
Tuple(java.lang.Object[] entities)
Create a new tuple.
|
Tuple(java.lang.Object entity1,
java.lang.Object entity2)
Convenience constructor for binary tuples.
|
Tuple(java.lang.Object entity1,
java.lang.Object entity2,
java.lang.Object entity3)
Convenience constructor for binary tuples.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Clone this tuple.
|
boolean |
equals(java.lang.Object o)
Test two tuples for equality.
|
java.lang.Object |
get(int n)
Get an entity.
|
java.lang.Object[] |
getEntities()
Get entities
|
java.lang.Object |
getEntity(int n)
Get an entity.
|
int |
hashCode()
Compute the hashcode of the tuple.
|
static void |
main(java.lang.String[] args) |
int |
size()
Get the size.
|
java.lang.String |
toString()
Convert this tuple to a string representation.
|
public Tuple(java.lang.Object entity1, java.lang.Object entity2)
entity1
- The first object in the tuple.entity2
- The second object in the tuple.public Tuple(java.lang.Object entity1, java.lang.Object entity2, java.lang.Object entity3)
entity1
- The first object in the tuple.entity2
- The second object in the tuple.entity3
- The third object in the tuple.public Tuple(java.lang.Object[] entities)
entities
- The objects in the tuple.public java.lang.Object getEntity(int n)
n
- The entities position.public java.lang.Object[] getEntities()
public java.lang.Object get(int n)
n
- The entities position.public int size()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception