|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ckkloverdos.tuple.TupleSkeleton
org.ckkloverdos.tuple.ListTuple
public class ListTuple
A ITuple
implementation backed by a List
.
Constructor Summary | |
---|---|
ListTuple(java.util.List list)
Constructs the tuple from the list . |
Method Summary | |
---|---|
java.lang.Object |
get(int n)
Returns the n th element of the tuple. |
boolean |
isEmpty()
Returns true iff this tuple contains no elements. |
boolean |
isNull(int n)
Returns true iff the n th element
of the tuple is null . |
int |
size()
Returns the size of this tuple. |
Methods inherited from class org.ckkloverdos.tuple.TupleSkeleton |
---|
equals, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListTuple(java.util.List list)
list
.
list
- Method Detail |
---|
public java.lang.Object get(int n)
n
th element of the tuple.
Indices start from zero.
n
-
java.lang.IndexOutOfBoundsException
- if the index n
is beyond the bounds of this tuple.
java.lang.NullPointerException
- if the underlying list is null
.public int size()
null
, then it returns zero.
public boolean isNull(int n)
true
iff the n
th element
of the tuple is null
.
n
-
java.lang.IndexOutOfBoundsException
- if the index n
is beyond the bounds of this tuple.
java.lang.NullPointerException
- if the underlying list is null
.public boolean isEmpty()
true
iff this tuple contains no elements.
If the underlying list is null
, then it returns true
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |