|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.shapelogic.streams.BaseCommonStream<E> org.shapelogic.streams.BaseListCommonStream<E> org.shapelogic.streams.BaseListStream0<java.lang.Integer> org.shapelogic.mathematics.PrimeNumberStream
public class PrimeNumberStream
Generated Prime Number.
Should this be based on a BaseListStream, when there is no input?
Probably not.
How should they be generated?
I could say start by last number and add until you get one that does not
have any of the previous as divisors.
There can be a stop value:
start index default 0
max last / last number default not set
Field Summary |
---|
Fields inherited from class org.shapelogic.streams.BaseListCommonStream |
---|
_list |
Fields inherited from class org.shapelogic.streams.BaseCommonStream |
---|
_context, _current, _dirty, _last, _maxLast, _name, _nullLegalValue, _parentContext, _query, _value |
Constructor Summary | |
---|---|
PrimeNumberStream()
|
|
PrimeNumberStream(int maxLast)
|
Method Summary | |
---|---|
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.BaseListStream0 |
---|
getList, invokeIndex, setList |
Methods inherited from class org.shapelogic.streams.BaseListCommonStream |
---|
calcAddNext, get, getCurrentSize, hasNext, hasNextBase, isCached, isRandomAccess, iterator, next, setLastFromInput |
Methods inherited from class org.shapelogic.streams.BaseCommonStream |
---|
getContext, getInContext, getIndex, getLast, getMaxLast, getName, getParentContext, getValue, isDeterministic, isDirty, isNullLegalValue, remove, setMaxLast, setNullLegalValue, setup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.shapelogic.streams.NumberedStream |
---|
getIndex, getLast, getMaxLast, setMaxLast |
Methods inherited from interface org.shapelogic.calculation.LazyCalc |
---|
isDirty, setup |
Methods inherited from interface org.shapelogic.calculation.CalcValue |
---|
getValue |
Methods inherited from interface java.util.Iterator |
---|
remove |
Constructor Detail |
---|
public PrimeNumberStream()
public PrimeNumberStream(int maxLast)
Method Detail |
---|
public java.lang.Integer invoke(int index)
IndexedInputStream0
index
- of element in list
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |