be.SIRAPRISE.client
Class OrderedRelation

java.lang.Object
  extended by be.SIRAPRISE.client.AbstractTupleContainer
      extended by be.SIRAPRISE.client.AbstractRelation
          extended by be.SIRAPRISE.client.OrderedRelation
All Implemented Interfaces:
Relation, TupleContainer, java.lang.Iterable<Tuple>

public final class OrderedRelation
extends AbstractRelation

An OrderedRelation is a relation that maintains its tuples in the order determined by the given comparator

Author:
Erwin Smout

Constructor Summary
OrderedRelation(TupleOrderer tupleOrderer, Heading heading)
           
 
Method Summary
 boolean addOK(Tuple tuple)
          "exit" method called by the addTuple() methods to check if it is OK to add the given tuple to this relation.
 
Methods inherited from class be.SIRAPRISE.client.AbstractRelation
addTupleWithoutHeadingCheck, clear, containsTuple, containsTuples, equals, getTupleSet, hashCode, iterator, removeTuple, size
 
Methods inherited from class be.SIRAPRISE.client.AbstractTupleContainer
addTuplesWithHeadingCheck, addTuplesWithoutHeadingCheck, addTupleWithHeadingCheck, getHeading, printBodyEscapedWithBodyHeaderWithoutTypeNames, printBodyEscapedWithBodyHeaderWithTypeNames, printBodyEscapedWithoutBodyHeaderWithoutTypeNames, printBodyEscapedWithoutBodyHeaderWithTypeNames, printBodyWithBodyHeaderWithoutTypeNames, printBodyWithBodyHeaderWithTypeNames, printBodyWithoutBodyHeaderWithoutTypeNames, printBodyWithoutBodyHeaderWithTypeNames, printBodyXMLWithBodyHeader, printBodyXMLWithoutBodyHeader, printValueEscapedWithoutTypeNames, printValueEscapedWithTypeNames, printValueWithoutTypeNames, printValueWithTypeNames, printValueXML, removeTuples, toObjectArray, toObjectArrayIgnoringMissingSetters, toObjectCollection, toObjectCollectionIgnoringMissingSetters, toObjectsArray, toObjectsCollection, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface be.SIRAPRISE.client.TupleContainer
addTuplesWithHeadingCheck, addTuplesWithoutHeadingCheck, addTupleWithHeadingCheck, getHeading, printValueEscapedWithoutTypeNames, printValueEscapedWithTypeNames, printValueWithoutTypeNames, printValueWithTypeNames, printValueXML, removeTuples, toObjectArray, toObjectArrayIgnoringMissingSetters, toObjectCollection, toObjectCollectionIgnoringMissingSetters, toObjectsArray, toObjectsCollection
 

Constructor Detail

OrderedRelation

public OrderedRelation(TupleOrderer tupleOrderer,
                       Heading heading)
Parameters:
tupleOrderer -
heading -
Method Detail

addOK

public boolean addOK(Tuple tuple)
Description copied from class: AbstractRelation
"exit" method called by the addTuple() methods to check if it is OK to add the given tuple to this relation. This method should return false only in very specific circumstances.

Specified by:
addOK in class AbstractRelation
Parameters:
tuple - The tuple about to be added to the relation.
Returns:
true if it is OK to add the tuple to the given relation.