|
Jadex 0.96-beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjadex.util.Tuple
public class Tuple
A tuple is a list of entities. The entities of a tuple may be null. The equals and hashCode methods are overridden, such that two tuples are equal and have the same hashcode, if they contain the same entities. Therefore tuples can be used for multipart keys in hashtables.
Hashtable
,
Object.hashCode()
,
Object.equals(Object)
,
Serialized FormConstructor Summary | |
---|---|
Tuple(Object[] entities)
Create a new tuple. |
|
Tuple(Object entity1,
Object entity2)
Convenience constructor for binary tuples. |
Method Summary | |
---|---|
Object |
clone()
Clone this tuple. |
boolean |
equals(Object o)
Test two tuples for equality. |
Object |
get(int n)
Get an entity. |
Object[] |
getEntities()
Get entities |
Object |
getEntity(int n)
Get an entity. |
int |
hashCode()
Compute the hashcode of the tuple. |
int |
size()
Get the size. |
String |
toString()
Convert this tuple to a string representation. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Tuple(Object entity1, Object entity2)
entity1
- The first object in the tuple.entity2
- The second object in the tuple.public Tuple(Object[] entities)
entities
- The objects in the tuple.Method Detail |
---|
public Object getEntity(int n)
n
- The entities position.
public Object[] getEntities()
public Object get(int n)
n
- The entities position.
public int size()
public int hashCode()
hashCode
in class Object
public boolean equals(Object o)
equals
in class Object
public String toString()
toString
in class Object
public Object clone()
clone
in class Object
|
Jadex 0.96-beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.