|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.SIRAPRISE.client.AbstractTupleContainer
be.SIRAPRISE.client.AbstractTupleBag
public abstract class AbstractTupleBag
Abstract implementation of the TupleBag interface
Constructor Summary | |
---|---|
AbstractTupleBag(Heading heading,
java.util.List<Tuple> list)
Creates the TupleBag |
Method Summary | |
---|---|
abstract 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. |
void |
addTupleWithoutHeadingCheck(Tuple t)
Adds a Tuple to the container without checking the conformance of the tuple to the declared heading. |
void |
clear()
Empties the TupleContainer |
boolean |
containsTuple(Tuple t)
Checks whether the given tuple appears in this container |
boolean |
containsTuples(TupleContainer tupleContainer)
Checks whether all tuples that appear in the given container also appear in this one |
java.util.Iterator<Tuple> |
iterator()
Gets an iterator over the tuples in the container |
boolean |
removeTuple(Tuple t)
Removes the given tuple from this container if that tuple appears there |
int |
size()
Gets The number of tuples that appear in the relation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractTupleBag(Heading heading, java.util.List<Tuple> list)
heading
- The Heading that all tuples in the bag must be guaranteed to conform tolist
- The list underlying the Collection behaviour of the TupleBagMethod Detail |
---|
public abstract boolean addOK(Tuple tuple)
tuple
- The tuple about to be added to the relation.
public final void addTupleWithoutHeadingCheck(Tuple t)
AbstractTupleContainer
addTupleWithoutHeadingCheck
in interface TupleContainer
addTupleWithoutHeadingCheck
in class AbstractTupleContainer
t
- The tuple to be added to the containerpublic final void clear()
TupleContainer
clear
in interface TupleContainer
public final boolean containsTuple(Tuple t)
TupleContainer
containsTuple
in interface TupleContainer
t
- The tuple value to be tested for presence in the container
public final boolean containsTuples(TupleContainer tupleContainer)
TupleContainer
containsTuples
in interface TupleContainer
tupleContainer
- The tuple container whose tuples must all be contained in this one for the method to return true
public final java.util.Iterator<Tuple> iterator()
AbstractTupleContainer
iterator
in interface TupleContainer
iterator
in interface java.lang.Iterable<Tuple>
iterator
in class AbstractTupleContainer
public boolean removeTuple(Tuple t)
TupleContainer
removeTuple
in interface TupleContainer
removeTuple
in class AbstractTupleContainer
t
- The tuple to be removed from the container
public final int size()
TupleContainer
size
in interface TupleContainer
size
in class AbstractTupleContainer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |