org.shapelogic.mathematics
Class NaturalNumberStream
java.lang.Object
org.shapelogic.streams.BaseListCommonStream<E>
org.shapelogic.streams.BaseListStream0<java.lang.Integer>
org.shapelogic.mathematics.NaturalNumberStream
- All Implemented Interfaces:
- java.lang.Iterable<java.lang.Integer>, java.util.Iterator<java.lang.Integer>, CalcValue<java.lang.Integer>, ContextGettable, InContexts, LazyCalc<java.lang.Integer>, IndexedInputStream0<java.lang.Integer>, ListStream<java.lang.Integer>, NumberedStream<java.lang.Integer>, Stream<java.lang.Integer>, StreamProperties
public class NaturalNumberStream
- extends BaseListStream0<java.lang.Integer>
Generated Natural Number.
There can be both a start and stop value:
start index default 0
max last / last number default not set
- Author:
- Sami Badawi
Method Summary |
int |
getStartIndex()
|
java.lang.Integer |
invoke(int index)
Closure to calculated 1 individual element based on index and input for
the same index. |
Methods inherited from class org.shapelogic.streams.BaseListCommonStream |
calcAddNext, get, getContext, getContexts, getCurrentSize, getInContext, getIndex, getLast, getMaxLast, getName, getValue, hasNext, hasNextBase, isCached, isContextBased, isDeterministic, isDirty, isRandomAccess, iterator, next, remove, setMaxLast, setup |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NaturalNumberStream
public NaturalNumberStream()
NaturalNumberStream
public NaturalNumberStream(int maxLast)
NaturalNumberStream
public NaturalNumberStream(int startIndex,
java.lang.Integer maxLast)
invoke
public java.lang.Integer invoke(int index)
- Description copied from interface:
IndexedInputStream0
- Closure to calculated 1 individual element based on index and input for
the same index.
Should later just call the invoke on the closure.
Maybe this should be moved up later.
- Parameters:
index
- of element in list
getStartIndex
public int getStartIndex()
Copyright © 2008. All Rights Reserved.