- java.lang.Object
- 
- com.pervasive.datarush.functions.FixedType
 
- 
- All Implemented Interfaces:
- FunctionTyper
 
 public class FixedType extends Object implements FunctionTyper A typer for functions which return a fixed, known type.
- 
- 
Constructor SummaryConstructors Constructor Description FixedType(ScalarTokenType type)Creates a typer which always returns the given type.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ScalarTokenTypecomputeResultType(FunctionContext ctx)Calculates the result type for the function given the provided context.ScalarTokenTypecomputeUpperBound(FunctionContext ctx)Calculates the upper bound for the function given the provided context.
 
- 
- 
- 
Constructor Detail- 
FixedTypepublic FixedType(ScalarTokenType type) Creates a typer which always returns the given type.- Parameters:
- type- the return type of the function. This must not be an abstract type.
- Throws:
- IllegalArgumentException- if the type is not a valid return type for functions
 
 
- 
 - 
Method Detail- 
computeUpperBoundpublic ScalarTokenType computeUpperBound(FunctionContext ctx) Description copied from interface:FunctionTyperCalculates the upper bound for the function given the provided context.The context contains the upper bounds on the types of all arguments to the function. If a argument is not a subclass of ScalarValuedFunction, its type isnull.- Specified by:
- computeUpperBoundin interface- FunctionTyper
- Parameters:
- ctx- the context of the function being processed
- Returns:
- the upper bound on the function
 
 - 
computeResultTypepublic ScalarTokenType computeResultType(FunctionContext ctx) Description copied from interface:FunctionTyperCalculates the result type for the function given the provided context.The context contains the actual result types of all arguments to the function. If a argument is not a subclass of ScalarValuedFunction, its type isnull.- Specified by:
- computeResultTypein interface- FunctionTyper
- Parameters:
- ctx- the context of the function being processed
- Returns:
- the result type of the function
 
 
- 
 
-