Package com.streambase.sb
Class CompleteDataType.FunctionType
java.lang.Object
com.streambase.sb.CompleteDataType
com.streambase.sb.CompleteDataType.FunctionType
-
Nested Class Summary
Nested classes/interfaces inherited from class com.streambase.sb.CompleteDataType
CompleteDataType.CaptureType, CompleteDataType.FunctionType, CompleteDataType.ListType, CompleteDataType.TupleType -
Field Summary
Fields inherited from class com.streambase.sb.CompleteDataType
NULL_TO_TYPE_SCORE, SCORE_FAIL, SCORE_PASS, type, TYPE_TO_TYPE_SCORE, WILDCARD_SCORE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanMethod for subclasses to override if they have a broader concept of type.booleanbooleanequalTypes(CompleteDataType completeType) For function types, return the argument schema.For function types, return the return type of the function.inthashCode()longcalculate the coercion score to get coerce this → type - by default returns SCORE_PASS or SCORE_FAIL based on equalstoHumanString(SchemaUtil.SchemaProvider schemaProvider) Return a String describing the type suitable for error messages.Methods inherited from class com.streambase.sb.CompleteDataType
canAssignFrom, equalBaseTypes, findSuperType, forBlob, forBlobList, forBool, forBoolean, forBoolList, forCapture, forDouble, forDoubleList, forFunction, forInt, forIntList, forList, forLong, forLongList, forString, forStringList, forTimestamp, forTimestampList, forTuple, getCaptureName, getDataType, getElementType, getName, getSchema, rateCoercion, toHumanString, toString
-
Constructor Details
-
FunctionType
Constructor- Parameters:
arguments- Function argumentsreturnType- Function return type
-
-
Method Details
-
toHumanString
Description copied from class:CompleteDataTypeReturn a String describing the type suitable for error messages.- Specified by:
toHumanStringin classCompleteDataType- Parameters:
schemaProvider- A schema provider to identify named schemas- Returns:
- param a suitable string
-
getArgumentSchema
Description copied from class:CompleteDataTypeFor function types, return the argument schema. For other types null is returned.- Overrides:
getArgumentSchemain classCompleteDataType- Returns:
- the function type's argument schema
-
getReturnType
Description copied from class:CompleteDataTypeFor function types, return the return type of the function. For other types, return null.- Overrides:
getReturnTypein classCompleteDataType- Returns:
- the function type's return type
-
equals
-
hashCode
-
equalTypes
-
rateCoercion
Description copied from class:CompleteDataTypecalculate the coercion score to get coerce this → type - by default returns SCORE_PASS or SCORE_FAIL based on equals- Overrides:
rateCoercionin classCompleteDataType- Parameters:
to- the CType to converse to- Returns:
- the score, use COp.java as a reference for score constants
-
canAssignFromImpl
Method for subclasses to override if they have a broader concept of type.- Overrides:
canAssignFromImplin classCompleteDataType- Parameters:
other- the other type- Returns:
- type assignment compatibility
-