eRqlEngine API documentation - http://www.wleklinski.de/rdf/

eworks.RDF.model
Class SingleGroupedTuples

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended byeworks.RDF.model.AbstractTuples
                  extended byeworks.RDF.model.SingleGroupedTuples
All Implemented Interfaces:
Cloneable, Collection, List, RandomAccess, Serializable, Tuples

public class SingleGroupedTuples
extends AbstractTuples

Represents a set of grouped tuples and provides methods to manage them. Each tuple is represented by an instance of a class that implements the Tuple interface.

This implementation supports the grouping of tuples as defined by the methods Tuples.getNumberOfGroups() and Tuples.getTuplesByGroup(int). Every single tuple is generally contained inside it's own group.

Version:
1.00 (2003-11-03)
Author:
Fabian Wleklinski (fabian@wleklinski.de)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
SingleGroupedTuples()
          Creates a new and empty set of tuples.
SingleGroupedTuples(Collection c)
          Creates a new set of tuples and initializes it with a given set of tuples.
SingleGroupedTuples(int initialCapacity)
          Creates a new and empty set of tuples with a given initial capacity.
SingleGroupedTuples(Tuple t)
          Creates a new and empty set of tuples with a given initial tuple.
 
Method Summary
 Object clone()
          Clones this tuple set and returns a new instance containing the same tuples.
 int getNumberOfGroups()
          Returns the number of tuple groups.
 Tuples getTuplesByGroup(int groupIndex)
          Returns all tuples of a certain tuple groups, that is specified by it's numerical index.
 
Methods inherited from class eworks.RDF.model.AbstractTuples
add, addAll, getTuple
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, 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 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

SingleGroupedTuples

public SingleGroupedTuples()
Creates a new and empty set of tuples.


SingleGroupedTuples

public SingleGroupedTuples(Tuple t)
Creates a new and empty set of tuples with a given initial tuple.

Parameters:
t - The initial tuple.

SingleGroupedTuples

public SingleGroupedTuples(int initialCapacity)
Creates a new and empty set of tuples with a given initial capacity.

Parameters:
initialCapacity - The initial capacity.

SingleGroupedTuples

public SingleGroupedTuples(Collection c)
Creates a new set of tuples and initializes it with a given set of tuples.

Parameters:
c - The set of tuples to initialize the new tuple set.
Method Detail

getNumberOfGroups

public int getNumberOfGroups()
Returns the number of tuple groups. That's the number of tuples in this implementation.

Specified by:
getNumberOfGroups in interface Tuples
Overrides:
getNumberOfGroups in class AbstractTuples
Returns:
The number of tuple groups.

getTuplesByGroup

public Tuples getTuplesByGroup(int groupIndex)
Returns all tuples of a certain tuple groups, that is specified by it's numerical index. The returned tuples are returned using a class that implements the Tuples interface as well.

Specified by:
getTuplesByGroup in interface Tuples
Overrides:
getTuplesByGroup in class AbstractTuples
Parameters:
groupIndex - The group's index.
Returns:
The tuples of the tuple group index.
Throws:
ArrayIndexOutOfBoundsException - if this tuple group does not exist, see getNumberOfGroups().

clone

public Object clone()
Clones this tuple set and returns a new instance containing the same tuples.

Returns:
A clone of this tuple set.

eRqlEngine API documentation - http://www.wleklinski.de/rdf/