|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.shapelogic.streams.NamedNumberedStream<E>
public class NamedNumberedStream<E>
Get a Named Stream out of the context.
Field Summary | |
---|---|
protected NumberedStream<E> |
_inputStream
|
protected java.lang.String |
_key
|
Constructor Summary | |
---|---|
NamedNumberedStream(java.lang.String key)
|
|
NamedNumberedStream(java.lang.String key,
int maxLast)
|
Method Summary | |
---|---|
E |
get(int input)
Get the calculate value for index based on the previous stream So it just calls invoke(getInputStream().get(index), index) |
int |
getIndex()
Index of last successfully processed element. |
static NumberedStream |
getInstance(java.lang.String key)
|
int |
getLast()
Last possible element. |
int |
getMaxLast()
Set a max value for last possible element. |
E |
getValue()
Starts a lazy calculation. |
boolean |
hasNext()
|
boolean |
isDirty()
When dirty is false that means that the calculated value can be used |
E |
next()
|
void |
remove()
|
void |
setMaxLast(int maxLast)
Set a max value for last possible element. |
void |
setup()
Currently not super well define used for 2 purposes: Reset: called from the outside if you want to reuse it init: Called from the inside when calculation start to have everything setup maybe the semantic could work for both? TODO: This should be separated better. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String _key
protected NumberedStream<E> _inputStream
Constructor Detail |
---|
public NamedNumberedStream(java.lang.String key, int maxLast)
public NamedNumberedStream(java.lang.String key)
Method Detail |
---|
public static NumberedStream getInstance(java.lang.String key)
public E get(int input)
NumberedStream
get
in interface NumberedStream<E>
public int getIndex()
NumberedStream
getIndex
in interface NumberedStream<E>
public int getLast()
NumberedStream
getLast
in interface NumberedStream<E>
public int getMaxLast()
NumberedStream
getMaxLast
in interface NumberedStream<E>
public void setMaxLast(int maxLast)
NumberedStream
setMaxLast
in interface NumberedStream<E>
public boolean isDirty()
LazyCalc
isDirty
in interface LazyCalc<E>
public void setup()
LazyCalc
setup
in interface LazyCalc<E>
public E getValue()
CalcValue
getValue
in interface CalcValue<E>
public boolean hasNext()
hasNext
in interface java.util.Iterator<E>
public E next()
next
in interface java.util.Iterator<E>
public void remove()
remove
in interface java.util.Iterator<E>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |