|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.shapelogic.streams.NamedListStream<E>
public class NamedListStream<E>
Get a Named Stream out of the context.
| Field Summary | |
|---|---|
protected ListStream<E> |
_inputStream
|
protected java.lang.String |
_key
|
| Constructor Summary | |
|---|---|
NamedListStream(java.lang.String key)
|
|
NamedListStream(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. |
int |
getLast()
Last possible element. |
java.util.List<E> |
getList()
Get underlying list. |
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 |
java.util.Iterator<E> |
iterator()
|
E |
next()
|
void |
remove()
|
void |
setList(java.util.List<E> list)
Get underlying list. |
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 ListStream<E> _inputStream
| Constructor Detail |
|---|
public NamedListStream(java.lang.String key,
int maxLast)
public NamedListStream(java.lang.String key)
| Method Detail |
|---|
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>public java.util.List<E> getList()
ListStream
getList in interface ListStream<E>public void setList(java.util.List<E> list)
ListStream
setList in interface ListStream<E>public java.util.Iterator<E> iterator()
iterator in interface java.lang.Iterable<E>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||