|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.shapelogic.calculation.CartesianIndex2
public class CartesianIndex2
CartesianIndex2 creates an accessing scheme for 2 NumberedStream, List or Array.
Field Summary | |
---|---|
protected boolean |
_dirty
|
protected int[] |
_lengths
|
protected int[] |
_start
_start is the start value of a dimension. |
protected int[] |
_stop
_stop is the start value of a dimension. |
protected int[] |
_value
_value is the current index. |
Constructor Summary | |
---|---|
CartesianIndex2(java.util.List list0,
java.util.List list1)
|
|
CartesianIndex2(NumberedStream numberedStream0,
NumberedStream numberedStream1)
|
|
CartesianIndex2(java.lang.Object[] array0,
java.lang.Object[] array1)
|
Method Summary | |
---|---|
int[] |
get(int index)
Get the calculate value for index based on the previous stream. |
int |
getDimension()
|
int |
getIndex()
Index of last successfully processed element. |
int |
getLast()
Last possible element. |
int[] |
getLastNumbers()
|
int |
getMaxLast()
Manually set max value for last possible element. |
int[] |
getStartNumbers()
|
int[] |
getValue()
Starts a lazy calculation. |
boolean |
hasNext()
|
boolean |
isDirty()
When dirty is false that means that the calculated value can be used |
int[] |
next()
|
void |
remove()
|
void |
setMaxLast(int maxLast)
Set a max value for last possible element. |
void |
setup()
If there are cases where you know the start and stop. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int[] _value
protected int[] _start
protected int[] _stop
protected int[] _lengths
protected boolean _dirty
Constructor Detail |
---|
public CartesianIndex2(NumberedStream numberedStream0, NumberedStream numberedStream1)
public CartesianIndex2(java.util.List list0, java.util.List list1)
public CartesianIndex2(java.lang.Object[] array0, java.lang.Object[] array1)
Method Detail |
---|
public void setup()
setup
in interface LazyCalc<int[]>
public int[] get(int index)
NumberedStream
get
in interface NumberedStream<int[]>
public int getDimension()
getDimension
in interface CartesianIndex
public int[] getLastNumbers()
getLastNumbers
in interface CartesianIndex
public int[] getStartNumbers()
getStartNumbers
in interface CartesianIndex
public boolean hasNext()
hasNext
in interface java.util.Iterator<int[]>
public int[] next()
next
in interface java.util.Iterator<int[]>
public void remove()
remove
in interface java.util.Iterator<int[]>
public boolean isDirty()
LazyCalc
isDirty
in interface LazyCalc<int[]>
public int[] getValue()
CalcValue
getValue
in interface CalcValue<int[]>
public int getIndex()
NumberedStream
getIndex
in interface NumberedStream<int[]>
public int getLast()
NumberedStream
getLast
in interface NumberedStream<int[]>
public int getMaxLast()
NumberedStream
getMaxLast
in interface NumberedStream<int[]>
public void setMaxLast(int maxLast)
NumberedStream
setMaxLast
in interface NumberedStream<int[]>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |