Package com.streambase.sb
Class CompleteDataType.TupleType
java.lang.Object
com.streambase.sb.CompleteDataType
com.streambase.sb.CompleteDataType.TupleType
- All Implemented Interfaces:
Serializable
- Enclosing class:
- CompleteDataType
Tuple type
- See Also:
-
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
equalTypes
(CompleteDataType completeType) For tuple types, return the tuple's schema.int
hashCode()
long
calculate the coercion score to get coerce this → type - by default returns SCORE_PASS or SCORE_FAIL based on equalslong
rateCoercion
(CompleteDataType to, boolean capture) Rate coerciontoHumanString
(SchemaUtil.SchemaProvider provider) Return a String describing the type suitable for error messages.Methods inherited from class com.streambase.sb.CompleteDataType
canAssignFrom, canAssignFromImpl, equalBaseTypes, findSuperType, forBlob, forBlobList, forBool, forBoolean, forBoolList, forCapture, forDouble, forDoubleList, forFunction, forInt, forIntList, forList, forLong, forLongList, forString, forStringList, forTimestamp, forTimestampList, forTuple, getArgumentSchema, getCaptureName, getDataType, getElementType, getName, getReturnType, rateCoercion, toHumanString, toString
-
Constructor Details
-
TupleType
Constructor- Parameters:
schema
- Schema
-
-
Method Details
-
getSchema
Description copied from class:CompleteDataType
For tuple types, return the tuple's schema. For other types null is returned.- Overrides:
getSchema
in classCompleteDataType
- Returns:
- the tuple types's schema
-
equals
- Overrides:
equals
in classCompleteDataType
-
equalTypes
-
hashCode
public int hashCode()- Overrides:
hashCode
in classCompleteDataType
-
toHumanString
Description copied from class:CompleteDataType
Return a String describing the type suitable for error messages.- Specified by:
toHumanString
in classCompleteDataType
- Parameters:
provider
- A schema provider to identify named schemas- Returns:
- param a suitable string
-
rateCoercion
Description copied from class:CompleteDataType
calculate the coercion score to get coerce this → type - by default returns SCORE_PASS or SCORE_FAIL based on equals- Overrides:
rateCoercion
in classCompleteDataType
- Parameters:
to
- the CType to converse to- Returns:
- the score, use COp.java as a reference for score constants
-
rateCoercion
Rate coercion- Parameters:
to
- Target typecapture
- true to consider capture fields- Returns:
- Coercion value
-