Package org.apache.solr.client.solrj.io.stream.expr

## Class StreamFactory

- java.lang.Object
- - org.apache.solr.client.solrj.io.stream.expr.StreamFactory

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `DefaultStreamFactory`

    public class StreamFactory
    extends Object
    implements Serializable

Used to convert strings into stream expressions

See Also:
  Serialized Form

### Constructor Summary

Constructors
`StreamFactory()`
`StreamFactory​(HashMap<String,​Supplier<Class<? extends Expressible>>> functionNames)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `clone()`
`StreamComparator` `constructComparator​(String comparatorString, Class<? extends StreamComparator> comparatorType)`
`StreamEqualitor` `constructEqualitor​(String equalitorString, Class<? extends StreamEqualitor> equalitorType)`
`StreamEvaluator` `constructEvaluator​(String expressionClause)`
`StreamEvaluator` `constructEvaluator​(StreamExpression expression)`
`Metric` `constructMetric​(String expressionClause)`
`Metric` `constructMetric​(StreamExpression expression)`
`Metric` `constructOperation​(String expressionClause)`
`StreamOperation` `constructOperation​(StreamExpression expression)`
`Object` `constructPrimitiveObject​(String original)`
`TupleStream` `constructStream​(String expressionClause)`
`TupleStream` `constructStream​(StreamExpression expression)`
`<T> T` `createInstance​(Class<T> clazz, Class<?>[] paramTypes, Object[] params)`
`boolean` `doesRepresentTypes​(StreamExpression expression, Class<?>... clazzes)`
`boolean` `getBooleanOperand​(StreamExpression expression, String paramName, Boolean defaultValue)`
`String` `getCollectionZkHost​(String collectionName)`
`String` `getDefaultCollection()`
`String` `getDefaultSort()`
`String` `getDefaultZkHost()`
`List<StreamExpression>` `getExpressionOperands​(StreamExpression expression)`
`List<StreamExpression>` `getExpressionOperands​(StreamExpression expression, String functionName)`
`List<StreamExpression>` `getExpressionOperandsRepresentingTypes​(StreamExpression expression, Class<?>... clazzes)`
`String` `getFunctionName​(Class<? extends Expressible> clazz)`
`Map<String,​Supplier<Class<? extends Expressible>>>` `getFunctionNames()`
`int` `getIntOperand​(StreamExpression expression, String paramName, Integer defaultValue)`
`StreamExpressionNamedParameter` `getNamedOperand​(StreamExpression expression, String name)`
`List<StreamExpressionNamedParameter>` `getNamedOperands​(StreamExpression expression)`
`StreamExpressionParameter` `getOperand​(StreamExpression expression, int parameterIndex)`
`List<StreamExpressionParameter>` `getOperandsOfType​(StreamExpression expression, Class<?>... clazzes)`
`String` `getValueOperand​(StreamExpression expression, int parameterIndex)` Given an expression, will return the value parameter at the given index, or null if doesn't exist
`List<String>` `getValueOperands​(StreamExpression expression)`
`boolean` `isEvaluator​(StreamExpression expression)`
`boolean` `isStream​(StreamExpression expression)`
`StreamFactory` `withCollectionZkHost​(String collectionName, String zkHost)`
`StreamFactory` `withDefaultSort​(String sort)`
`StreamFactory` `withDefaultZkHost​(String zkHost)`
`StreamFactory` `withFunctionName​(String functionName, Class<? extends Expressible> clazz)`
`StreamFactory` `withFunctionName​(String functionName, Supplier<Class<? extends Expressible>> clazz)`
`StreamFactory` `withoutFunctionName​(String functionName)`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### StreamFactory

    public StreamFactory()

#### StreamFactory

    public StreamFactory​(HashMap<String,​Supplier<Class<? extends Expressible>>> functionNames)

### Method Detail

#### withCollectionZkHost

    public StreamFactory withCollectionZkHost​(String collectionName,
                                              String zkHost)

#### getDefaultCollection

    public String getDefaultCollection()

#### withDefaultZkHost

    public StreamFactory withDefaultZkHost​(String zkHost)

#### clone

    public Object clone()

Overrides:
  `clone` in class `Object`

#### withDefaultSort

    public StreamFactory withDefaultSort​(String sort)

#### getDefaultSort

    public String getDefaultSort()

#### getDefaultZkHost

    public String getDefaultZkHost()

#### getCollectionZkHost

    public String getCollectionZkHost​(String collectionName)

#### getFunctionNames

    public Map<String,​Supplier<Class<? extends Expressible>>> getFunctionNames()

#### withFunctionName

    public StreamFactory withFunctionName​(String functionName,
                                          Class<? extends Expressible> clazz)

#### withFunctionName

    public StreamFactory withFunctionName​(String functionName,
                                          Supplier<Class<? extends Expressible>> clazz)

#### withoutFunctionName

    public StreamFactory withoutFunctionName​(String functionName)

#### getOperand

    public StreamExpressionParameter getOperand​(StreamExpression expression,
                                                int parameterIndex)

#### getValueOperands

    public List<String> getValueOperands​(StreamExpression expression)

#### getValueOperand

    public String getValueOperand​(StreamExpression expression,
                                  int parameterIndex)

Given an expression, will return the value parameter at the given index, or null if doesn't exist

#### getNamedOperands

    public List<StreamExpressionNamedParameter> getNamedOperands​(StreamExpression expression)

#### getNamedOperand

    public StreamExpressionNamedParameter getNamedOperand​(StreamExpression expression,
                                                          String name)

#### getExpressionOperands

    public List<StreamExpression> getExpressionOperands​(StreamExpression expression)

#### getExpressionOperands

    public List<StreamExpression> getExpressionOperands​(StreamExpression expression,
                                                        String functionName)

#### getOperandsOfType

    public List<StreamExpressionParameter> getOperandsOfType​(StreamExpression expression,
                                                             Class<?>... clazzes)

#### getExpressionOperandsRepresentingTypes

    public List<StreamExpression> getExpressionOperandsRepresentingTypes​(StreamExpression expression,
                                                                         Class<?>... clazzes)

#### doesRepresentTypes

    public boolean doesRepresentTypes​(StreamExpression expression,
                                      Class<?>... clazzes)

#### getIntOperand

    public int getIntOperand​(StreamExpression expression,
                             String paramName,
                             Integer defaultValue)
                      throws IOException

Throws:
  `IOException`

#### getBooleanOperand

    public boolean getBooleanOperand​(StreamExpression expression,
                                     String paramName,
                                     Boolean defaultValue)
                              throws IOException

Throws:
  `IOException`

#### constructStream

    public TupleStream constructStream​(String expressionClause)
                                throws IOException

Throws:
  `IOException`

#### constructStream

    public TupleStream constructStream​(StreamExpression expression)
                                throws IOException

Throws:
  `IOException`

#### constructMetric

    public Metric constructMetric​(String expressionClause)
                           throws IOException

Throws:
  `IOException`

#### constructMetric

    public Metric constructMetric​(StreamExpression expression)
                           throws IOException

Throws:
  `IOException`

#### constructComparator

    public StreamComparator constructComparator​(String comparatorString,
                                                Class<? extends StreamComparator> comparatorType)
                                         throws IOException

Throws:
  `IOException`

#### constructEqualitor

    public StreamEqualitor constructEqualitor​(String equalitorString,
                                              Class<? extends StreamEqualitor> equalitorType)
                                       throws IOException

Throws:
  `IOException`

#### constructOperation

    public Metric constructOperation​(String expressionClause)
                              throws IOException

Throws:
  `IOException`

#### constructOperation

    public StreamOperation constructOperation​(StreamExpression expression)
                                       throws IOException

Throws:
  `IOException`

#### constructEvaluator

    public StreamEvaluator constructEvaluator​(String expressionClause)
                                       throws IOException

Throws:
  `IOException`

#### constructEvaluator

    public StreamEvaluator constructEvaluator​(StreamExpression expression)
                                       throws IOException

Throws:
  `IOException`

#### isStream

    public boolean isStream​(StreamExpression expression)
                     throws IOException

Throws:
  `IOException`

#### isEvaluator

    public boolean isEvaluator​(StreamExpression expression)
                        throws IOException

Throws:
  `IOException`

#### createInstance

    public <T> T createInstance​(Class<T> clazz,
                                Class<?>[] paramTypes,
                                Object[] params)
                         throws IOException

Throws:
  `IOException`

#### getFunctionName

    public String getFunctionName​(Class<? extends Expressible> clazz)
                           throws IOException

Throws:
  `IOException`

#### constructPrimitiveObject

    public Object constructPrimitiveObject​(String original)