public class Project extends UnaryOperator
tupleCounter
Constructor and Description |
---|
Project(Operator operator,
int[] slots)
Constructs a new projection operator.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
containsSlot(int slot)
Is the given slot contained in the projection array?
|
protected java.util.List<Tuple> |
innerProcessTuple(Tuple tuple,
int inOp)
Processes an incoming tuple.
|
protected Relation |
setOutputRelation()
Sets the output relation of this projection.
|
protected java.lang.String |
toStringSingle()
Textual representation
|
getInputOperator
allDone, cleanup, getInputOperator, getMultiNext, getNext, getNumberOfInputs, getOutputRelation, innerGetNext, prefix, processTuple, setInputs, setup, toString, toString, tuples
public Project(Operator operator, int[] slots) throws EngineException
operator
- the input operator.slots
- the slots to be projected.EngineException
- thrown whenever the projection operator
cannot be properly initialized.protected java.util.List<Tuple> innerProcessTuple(Tuple tuple, int inOp) throws EngineException
innerProcessTuple
in class Operator
tuple
- the tuple to be processed.inOp
- the index of the input operator the tuple to be
processed belongs to.EngineException
- on problems with projecting from the
input.protected boolean containsSlot(int slot)
slot
- the slot to be checked.true
if the slot is contained in the projection
array, false
otherwise.protected Relation setOutputRelation() throws EngineException
setOutputRelation
in class Operator
EngineException
- if the output relation cannot be
properly constructed.protected java.lang.String toStringSingle()
toStringSingle
in class Operator