|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.imemex.operators.AbstractPullOperator<E>
E - type of elementspublic abstract class AbstractPullOperator<E>
Abstract implementation of a pull operator which has a single element buffer.
Since the size of the buffer is only one, we can keep track of whether there
is a next element in the buffer using a boolean status flag (hasElementInBuffer).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.imemex.operators.Operator |
|---|
Operator.ExecTimeType |
| Field Summary | |
|---|---|
static boolean |
measureNext
Set to true to measure timing on calls to next. |
| Constructor Summary | |
|---|---|
AbstractPullOperator()
|
|
| Method Summary | |
|---|---|
void |
addExecTime(long nanos,
Operator.ExecTimeType type)
If an operator implementor wants - and it would if everyone did, he may collect execution times using this method. |
void |
close()
Does nothing. |
java.lang.String |
getDesc()
Get description. |
long |
getExecTime(Operator.ExecTimeType type)
Get collected execution times. |
java.util.List<PullOperator> |
getInputOperators()
Get input operators of this operator. |
OperatorMetaData |
getMetaData()
Returns the meta data of this operator. |
long |
getNumberOfElementsPassed()
Get the number of results produced so far. |
boolean |
hasNext()
|
E |
next()
|
void |
open()
Does nothing. |
E |
peek()
Shows the next element without removing it from the iterator |
void |
remove()
Throws an UnsupportedOperationException. |
void |
setDesc(java.lang.String description)
Set description. |
static PullOperator<java.lang.Object> |
toObjectPullOperator(PullOperator<?> inputOp)
transforms PullOperator of any type to Object-PullOperator |
java.lang.String |
toString()
|
java.lang.String |
toXML()
Get an XML representation of this pull operator. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static boolean measureNext
| Constructor Detail |
|---|
public AbstractPullOperator()
| Method Detail |
|---|
public void open()
open in interface Operatorpublic boolean hasNext()
hasNext in interface java.util.Iterator<E>public final E next()
next in interface java.util.Iterator<E>public void remove()
remove in interface java.util.Iterator<E>public void close()
close in interface Operatorpublic E peek()
PullOperator
peek in interface PullOperator<E>public OperatorMetaData getMetaData()
getMetaData in interface Operatorpublic final java.lang.String toXML()
Operator
toXML in interface Operatorpublic java.lang.String toString()
toString in class java.lang.Objectpublic final java.lang.String getDesc()
Operator
getDesc in interface Operatorpublic final void setDesc(java.lang.String description)
Operator
setDesc in interface Operatorpublic final long getNumberOfElementsPassed()
Operator
getNumberOfElementsPassed in interface Operator
public final void addExecTime(long nanos,
Operator.ExecTimeType type)
Operator
addExecTime in interface Operatornanos - number of nanoseconds to add to given time type.type - type of execution time.public final long getExecTime(Operator.ExecTimeType type)
Operator
getExecTime in interface Operatortype - type of execution time.
public java.util.List<PullOperator> getInputOperators()
PullOperator
getInputOperators in interface PullOperator<E>public static PullOperator<java.lang.Object> toObjectPullOperator(PullOperator<?> inputOp)
inputOp -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||