org.shapelogic.streams
Class StreamFactory

java.lang.Object
  extended by org.shapelogic.streams.StreamFactory

public class StreamFactory
extends java.lang.Object

StreamFactory is a factory for Streams.

Author:
Sami Badawi

Constructor Summary
StreamFactory(RecursiveContext recursiveContext)
           
 
Method Summary
<In0,In1,In2>
ListStream<java.lang.Boolean>
addAndListStream0(java.lang.String andName, java.lang.String partName, java.lang.String inputName, java.lang.String expression, java.lang.String binaryPredicateString, In2 compareObject, java.lang.String language)
           
<In0,In1,In2>
ListStream<java.lang.Boolean>
addToAndListStream0(java.lang.String andName, java.lang.String partName, java.lang.String inputName, BinaryPredicate<In1,In2> binaryPredicate, In2 compareObject)
           
<In0,In1,In2>
ListStream<java.lang.Boolean>
addToAndListStream0(java.lang.String andName, java.lang.String inputName, java.lang.String binaryPredicateString, In2 compareObject)
           
<In0,In1,In2>
ListStream<java.lang.Boolean>
addToAndListStream0(java.lang.String andName, java.lang.String partName, java.lang.String inputName, java.lang.String expression, BinaryPredicate<In1,In2> binaryPredicate, In2 compareObject, java.lang.String language)
           
<In0,In1,In2>
ListStream<java.lang.Boolean>
addToAndListStream0(java.lang.String andName, java.lang.String partName, java.lang.String inputName, java.lang.String binaryPredicateString, In2 compareObject)
           
static
<E> CalcIndex1<java.lang.Object,E>
createCalcIndex1(java.util.Iterator<E> iterator)
           
static
<In,E> ListStream<E>
createListStream(CalcIndex1<In,E> transformer)
           
static
<E> ListStream<E>
createListStream(java.util.Iterator<E> iterator)
           
static
<E> ListStream<E>
createListStream(java.util.Iterator<E> iterator, int maxLast)
           
static
<In,E> ListStream<E>
createListStream(java.lang.String name, java.lang.String expression, java.lang.String language, java.lang.Integer stopNumber, E... startList)
          Create stream based on a function.
<In0,In2> ListStream<java.lang.Boolean>
createListStream0(java.lang.String name, java.lang.String inputName, BinaryPredicate<In0,In2> binaryPredicate, In2 compareObject)
           
<In0,In1,In2>
ListStream<java.lang.Boolean>
createListStream0(java.lang.String name, java.lang.String inputName, java.lang.String expression, BinaryPredicate<In1,In2> binaryPredicate, In2 compareObject, java.lang.String language)
          Create stream based on a function.
<In0,In1,In2>
ListStream<java.lang.Boolean>
createListStream0(java.lang.String name, java.lang.String inputName, java.lang.String expression, java.lang.String binaryPredicateString, In2 compareObject, java.lang.String language)
          Create stream based on a function.
<E> NumberedStream<E>
findNumberedStream(java.lang.String name)
           
static
<E> NumberedStream<E>
findNumberedStream(java.lang.String name, RecursiveContext recursiveContext)
          Factory for finding NumberedStream in RecursiveContext.
static
<In1,In2> Calc1<In1,java.lang.Boolean>
makeBooleanCalc1(BinaryPredicate<In1,In2> binaryPredicate, In2 compareObject)
           
static
<In0,In1,In2>
Calc1<In0,java.lang.Boolean>
makeFunctionBooleanCalc1(java.lang.String expression, BinaryPredicate<In1,In2> binaryPredicate, In2 compareObject, java.lang.String language, java.lang.String functionName)
           
static
<In0,In1,In2>
Calc1<In0,java.lang.Boolean>
makeFunctionBooleanCalc1(java.lang.String expression, java.lang.String binaryPredicateString, In2 compareObject, java.lang.String language, java.lang.String functionName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamFactory

public StreamFactory(RecursiveContext recursiveContext)
Method Detail

createListStream

public static <In,E> ListStream<E> createListStream(CalcIndex1<In,E> transformer)

createListStream

public static <E> ListStream<E> createListStream(java.util.Iterator<E> iterator,
                                                 int maxLast)

createListStream

public static <E> ListStream<E> createListStream(java.util.Iterator<E> iterator)

createCalcIndex1

public static <E> CalcIndex1<java.lang.Object,E> createCalcIndex1(java.util.Iterator<E> iterator)

createListStream

public static <In,E> ListStream<E> createListStream(java.lang.String name,
                                                    java.lang.String expression,
                                                    java.lang.String language,
                                                    java.lang.Integer stopNumber,
                                                    E... startList)
Create stream based on a function.

Type Parameters:
In - is not used now maybe I should change the type
E - Element type
Parameters:
name - of the stream
expression - in Scripting language of values stream
language - Scripting language by name, Groovy is the default
stopNumber - length of this stream
startList - elements to add to stream at the beginning
Returns:

createListStream0

public <In0,In1,In2> ListStream<java.lang.Boolean> createListStream0(java.lang.String name,
                                                                     java.lang.String inputName,
                                                                     java.lang.String expression,
                                                                     BinaryPredicate<In1,In2> binaryPredicate,
                                                                     In2 compareObject,
                                                                     java.lang.String language)
Create stream based on a function.
I need to handle something like this:

A, "polygons", "def tempA2 = {it.points.length}", "==", 5

What should the output type of this be?
NumberedStream[Boolean]
CaclIndex[Boolean]
Predicate[Integer]

Type Parameters:
In - is not used now maybe I should change the type
E - Element type
Parameters:
name - of the created stream
input - name of the input stream
expression - in Scripting language of values stream
binaryPredicate - by name
compareObject -
language - Scripting language by name, Groovy is the default
Returns:

createListStream0

public <In0,In1,In2> ListStream<java.lang.Boolean> createListStream0(java.lang.String name,
                                                                     java.lang.String inputName,
                                                                     java.lang.String expression,
                                                                     java.lang.String binaryPredicateString,
                                                                     In2 compareObject,
                                                                     java.lang.String language)
Create stream based on a function.
I need to handle something like this:

A, "polygons", "def tempA2 = {it.points.length}", "==", 5

What should the output type of this be?
NumberedStream[Boolean]
CaclIndex[Boolean]
Predicate[Integer]

Type Parameters:
In - is not used now maybe I should change the type
E - Element type
Parameters:
name - of the created stream
input - name of the input stream
expression - in Scripting language of values stream
binaryPredicate - by name
compareObject -
language - Scripting language by name, Groovy is the default
Returns:

makeFunctionBooleanCalc1

public static <In0,In1,In2> Calc1<In0,java.lang.Boolean> makeFunctionBooleanCalc1(java.lang.String expression,
                                                                                  BinaryPredicate<In1,In2> binaryPredicate,
                                                                                  In2 compareObject,
                                                                                  java.lang.String language,
                                                                                  java.lang.String functionName)

makeBooleanCalc1

public static <In1,In2> Calc1<In1,java.lang.Boolean> makeBooleanCalc1(BinaryPredicate<In1,In2> binaryPredicate,
                                                                      In2 compareObject)

makeFunctionBooleanCalc1

public static <In0,In1,In2> Calc1<In0,java.lang.Boolean> makeFunctionBooleanCalc1(java.lang.String expression,
                                                                                  java.lang.String binaryPredicateString,
                                                                                  In2 compareObject,
                                                                                  java.lang.String language,
                                                                                  java.lang.String functionName)

findNumberedStream

public static <E> NumberedStream<E> findNumberedStream(java.lang.String name,
                                                       RecursiveContext recursiveContext)
                                            throws java.util.NoSuchElementException
Factory for finding NumberedStream in RecursiveContext.

Type Parameters:
E -
Parameters:
name - of the stream
Returns:
Throws:
java.util.NoSuchElementException

findNumberedStream

public <E> NumberedStream<E> findNumberedStream(java.lang.String name)

createListStream0

public <In0,In2> ListStream<java.lang.Boolean> createListStream0(java.lang.String name,
                                                                 java.lang.String inputName,
                                                                 BinaryPredicate<In0,In2> binaryPredicate,
                                                                 In2 compareObject)

addToAndListStream0

public <In0,In1,In2> ListStream<java.lang.Boolean> addToAndListStream0(java.lang.String andName,
                                                                       java.lang.String partName,
                                                                       java.lang.String inputName,
                                                                       java.lang.String expression,
                                                                       BinaryPredicate<In1,In2> binaryPredicate,
                                                                       In2 compareObject,
                                                                       java.lang.String language)

addAndListStream0

public <In0,In1,In2> ListStream<java.lang.Boolean> addAndListStream0(java.lang.String andName,
                                                                     java.lang.String partName,
                                                                     java.lang.String inputName,
                                                                     java.lang.String expression,
                                                                     java.lang.String binaryPredicateString,
                                                                     In2 compareObject,
                                                                     java.lang.String language)

addToAndListStream0

public <In0,In1,In2> ListStream<java.lang.Boolean> addToAndListStream0(java.lang.String andName,
                                                                       java.lang.String partName,
                                                                       java.lang.String inputName,
                                                                       BinaryPredicate<In1,In2> binaryPredicate,
                                                                       In2 compareObject)

addToAndListStream0

public <In0,In1,In2> ListStream<java.lang.Boolean> addToAndListStream0(java.lang.String andName,
                                                                       java.lang.String partName,
                                                                       java.lang.String inputName,
                                                                       java.lang.String binaryPredicateString,
                                                                       In2 compareObject)

addToAndListStream0

public <In0,In1,In2> ListStream<java.lang.Boolean> addToAndListStream0(java.lang.String andName,
                                                                       java.lang.String inputName,
                                                                       java.lang.String binaryPredicateString,
                                                                       In2 compareObject)


Copyright © 2009. All Rights Reserved.