|
eRqlEngine API documentation - http://www.wleklinski.de/rdf/ | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
eworks.RDF.model.AbstractTuples
An abstract base class for implementations of the Tuples
interface.
Represents a set of tuples and provides methods to manage instances that implement
the Tuple
interface.
This implementation does not support the grouping of tuples as defined by
the methods Tuples.getNumberOfGroups()
and Tuples.getTuplesByGroup(int)
,
derive classes should overwrite this methods, if they need real tuple grouping.
Field Summary |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
AbstractTuples()
Creates a new and empty set of tuples. |
|
AbstractTuples(Collection c)
Creates a new set of tuples and initializes it with a given set of tuples. |
|
AbstractTuples(int initialCapacity)
Creates a new and empty set of tuples with a given initial capacity. |
Method Summary | |
boolean |
add(Tuple t)
Adds the Tuple t . |
boolean |
addAll(Collection c,
boolean distinct)
Adds all tuples that are contained inside the given collection c . |
int |
getNumberOfGroups()
Returns the number of tuple goups, always 1 in this implementation. |
Tuple |
getTuple(int index)
Returns a certain tuple specified by it's numerical index. |
Tuples |
getTuplesByGroup(int groupIndex)
Returns all tuples of a certain tuple group. |
Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, remove, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface eworks.RDF.model.Tuples |
clone |
Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList |
Constructor Detail |
public AbstractTuples()
public AbstractTuples(int initialCapacity)
initialCapacity
- The initial capacity.public AbstractTuples(Collection c)
c
- The set of tuples to initialize the new tuple set.Method Detail |
public boolean add(Tuple t)
Tuple
t
. The tuples is added even if it
is already contained, so it can be contained multiple times.
add
in interface Tuples
t
- The tuple to add.
true
if and only if the set of tuples has changed.public int getNumberOfGroups()
getNumberOfGroups
in interface Tuples
public Tuples getTuplesByGroup(int groupIndex)
getTuplesByGroup
in interface Tuples
groupIndex
- The group's numerical index, has to be the value 1 in
this implementation.
ArrayIndexOutOfBoundsException
- if the groupIndex
is unequal to 1.public boolean addAll(Collection c, boolean distinct)
c
.
addAll
in interface Tuples
c
- The tuples to add.distinct
- If set to true
, there will no duplicates be added.
true
if and only if at least one tuple was added.public Tuple getTuple(int index)
getTuple
in interface Tuples
index
- The numerical index of the tuple to return.
index
.
ArrayIndexOutOfBoundsException
- if this tuple does not exist,
see ArrayList.size()
.
|
eRqlEngine API documentation - http://www.wleklinski.de/rdf/ | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |