|
||||||||||
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.AbstractRelation
public abstract class AbstractRelation
The AbstractRelation provides an implementation for the Relation interface
Constructor Summary | |
---|---|
AbstractRelation(Heading heading,
java.util.Set<Tuple> set)
Creates the container, setting the intended heading for the tuples and the underlying Set object |
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 tuple)
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 |
boolean |
equals(java.lang.Object obj)
|
java.util.Set<Tuple> |
getTupleSet()
Gets The set of Tuple objects constituting this relation value. |
int |
hashCode()
|
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 |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractRelation(Heading heading, java.util.Set<Tuple> set)
heading
- The heading for tuple container.set
- The Set object that will give us the Set interface methods. The behaviour of the iterator() method (in particular the iteration order) will be determined by the type of Set that is passed to this method.Method Detail |
---|
public final void addTupleWithoutHeadingCheck(Tuple tuple)
AbstractTupleContainer
addTupleWithoutHeadingCheck
in interface TupleContainer
addTupleWithoutHeadingCheck
in class AbstractTupleContainer
tuple
- The tuple to be added to the containerpublic abstract boolean addOK(Tuple tuple)
tuple
- The tuple about to be added to the relation.
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 boolean containsTuple(Tuple t)
TupleContainer
containsTuple
in interface TupleContainer
t
- The tuple value to be tested for presence in the container
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public final java.util.Set<Tuple> getTupleSet()
Relation
getTupleSet
in interface Relation
public final int hashCode()
hashCode
in class java.lang.Object
public final java.util.Iterator<Tuple> iterator()
AbstractTupleContainer
iterator
in interface TupleContainer
iterator
in interface java.lang.Iterable<Tuple>
iterator
in class AbstractTupleContainer
public final int size()
TupleContainer
size
in interface TupleContainer
size
in class AbstractTupleContainer
public final boolean removeTuple(Tuple t)
TupleContainer
removeTuple
in interface TupleContainer
removeTuple
in class AbstractTupleContainer
t
- The tuple to be removed from the container
public final void clear()
TupleContainer
clear
in interface TupleContainer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |