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

    public class StreamFactory
    extends Object
    implements Serializable

Used to convert strings into stream expressions

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`StreamFactory()`

### Method Summary

Methods
`Comparator<Tuple>` `constructComparator(String comparatorString, Class comparatorType)`
`TupleStream` `constructStream(StreamExpression expression)`
`TupleStream` `constructStream(String expressionClause)`
`<T> T` `createInstance(Class<T> clazz, Class<?>[] paramTypes, Object[] params)`
`String` `getCollectionZkHost(String collectionName)`
`List<StreamExpression>` `getExpressionOperands(StreamExpression expression)`
`List<StreamExpression>` `getExpressionOperands(StreamExpression expression, String functionName)`
`List<StreamExpression>` `getExpressionOperandsRepresentingTypes(StreamExpression expression, Class... clazzes)`
`String` `getFunctionName(Class clazz)`
`StreamExpressionNamedParameter` `getNamedOperand(StreamExpression expression, String name)`
`List<StreamExpressionNamedParameter>` `getNamedOperands(StreamExpression expression)`
`StreamExpressionParameter` `getOperand(StreamExpression expression, int parameterIndex)`
`List<StreamExpressionParameter>` `getOperandsOfType(StreamExpression expression, Class... clazzes)`
`Map<String,Class>` `getStreamFunctions()`
`String` `getValueOperand(StreamExpression expression, int parameterIndex)` Given an expression, will return the value parameter at the given index, or null if doesn't exist
`StreamFactory` `withCollectionZkHost(String collectionName, String zkHost)`
`StreamFactory` `withStreamFunction(String streamFunction, Class clazz)`

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

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

### Constructor Detail

#### StreamFactory

    public StreamFactory()

### Method Detail

#### withCollectionZkHost

    public StreamFactory withCollectionZkHost(String collectionName,
                                     String zkHost)

#### getCollectionZkHost

    public String getCollectionZkHost(String collectionName)

#### getStreamFunctions

    public Map<String,Class> getStreamFunctions()

#### withStreamFunction

    public StreamFactory withStreamFunction(String streamFunction,
                                   Class clazz)

#### getOperand

    public StreamExpressionParameter getOperand(StreamExpression expression,
                                       int parameterIndex)

#### 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)

#### constructStream

    public TupleStream constructStream(String expressionClause)
                                throws IOException

Throws:
  `IOException`

#### constructStream

    public TupleStream constructStream(StreamExpression expression)
                                throws IOException

Throws:
  `IOException`

#### constructComparator

    public Comparator<Tuple> constructComparator(String comparatorString,
                                        Class comparatorType)
                                          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 clazz)
                           throws IOException

Throws:
  `IOException`