org.shapelogic.streams
Class ArrayOutputListStream

java.lang.Object
  extended by org.shapelogic.streams.BaseCommonStream<E>
      extended by org.shapelogic.streams.BaseListCommonStream<E>
          extended by org.shapelogic.streams.BaseListStreamList<java.lang.Number,double[]>
              extended by org.shapelogic.streams.ArrayOutputListStream
All Implemented Interfaces:
java.lang.Iterable<double[]>, java.util.Iterator<double[]>, CalcList<java.lang.Number,double[]>, CalcValue<double[]>, ContextGettable, LazyCalc<double[]>, RecursiveContext, InputStreamList<java.lang.Number,double[]>, ListStream<double[]>, NumberedStream<double[]>, Stream<double[]>, StreamProperties

public class ArrayOutputListStream
extends BaseListStreamList<java.lang.Number,double[]>

ArrayOutputListStream takes a list of NumberStreams and creates a ListStream of double[].
This could be made more general, but start simple.

Author:
Sami Badawi

Field Summary
protected  java.util.List<java.lang.String> _ohNames
          Parallel to the NumberedStream.
protected  boolean _setupRun
           
 
Fields inherited from class org.shapelogic.streams.BaseListStreamList
_inputStream
 
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
ArrayOutputListStream(java.util.List<java.lang.String> ohNames, RecursiveContext recursiveContext)
           
ArrayOutputListStream(java.util.List<java.lang.String> ohNames, RecursiveContext recursiveContext, int maxLast)
           
ArrayOutputListStream(java.util.List<java.lang.String> ohNames, RecursiveContext recursiveContext, java.util.List<NumberedStream<java.lang.Number>> inputStream)
           
ArrayOutputListStream(java.util.List<java.lang.String> ohNames, RecursiveContext recursiveContext, java.util.List<NumberedStream<java.lang.Number>> inputStream, int maxLast)
           
ArrayOutputListStream(java.util.List<java.lang.String> ohNames, RecursiveContext recursiveContext, java.lang.String name, int maxLast)
          Use the ohName to also be the name of the input stream.
 
Method Summary
 java.util.List<NumberedStream<java.lang.Number>> getInputStream()
          Stream that this stream is connected to.
 double[] invoke(java.util.List<java.lang.Number> input)
           
 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 org.shapelogic.streams.BaseListStreamList
getDimension, getInput, getList, hasNext, invokeIndex, setLastFromInput, setList
 
Methods inherited from class org.shapelogic.streams.BaseListCommonStream
calcAddNext, get, getCurrentSize, hasNextBase, isCached, isRandomAccess, iterator, next
 
Methods inherited from class org.shapelogic.streams.BaseCommonStream
getContext, getInContext, getIndex, getLast, getMaxLast, getName, getParentContext, getValue, isDeterministic, isDirty, isNullLegalValue, remove, setMaxLast, setNullLegalValue
 
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
 
Methods inherited from interface org.shapelogic.calculation.CalcValue
getValue
 
Methods inherited from interface java.util.Iterator
remove
 

Field Detail

_ohNames

protected java.util.List<java.lang.String> _ohNames
Parallel to the NumberedStream.


_setupRun

protected boolean _setupRun
Constructor Detail

ArrayOutputListStream

public ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
                             RecursiveContext recursiveContext,
                             java.lang.String name,
                             int maxLast)
Use the ohName to also be the name of the input stream.

Parameters:
ohNames -
maxLast -

ArrayOutputListStream

public ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
                             RecursiveContext recursiveContext,
                             int maxLast)

ArrayOutputListStream

public ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
                             RecursiveContext recursiveContext)

ArrayOutputListStream

public ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
                             RecursiveContext recursiveContext,
                             java.util.List<NumberedStream<java.lang.Number>> inputStream,
                             int maxLast)

ArrayOutputListStream

public ArrayOutputListStream(java.util.List<java.lang.String> ohNames,
                             RecursiveContext recursiveContext,
                             java.util.List<NumberedStream<java.lang.Number>> inputStream)
Method Detail

setup

public void setup()
Description copied from interface: LazyCalc
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.

Specified by:
setup in interface LazyCalc<double[]>
Overrides:
setup in class BaseCommonStream<double[]>

invoke

public double[] invoke(java.util.List<java.lang.Number> input)

getInputStream

public java.util.List<NumberedStream<java.lang.Number>> getInputStream()
Description copied from interface: InputStreamList
Stream that this stream is connected to. What if the Range is of different type? I think that maybe I can relax this later.

Specified by:
getInputStream in interface InputStreamList<java.lang.Number,double[]>
Overrides:
getInputStream in class BaseListStreamList<java.lang.Number,double[]>


Copyright © 2009. All Rights Reserved.