com.streambase.sb

## Class CompleteDataType.FunctionType

- java.lang.Object
- - com.streambase.sb.CompleteDataType
  - - com.streambase.sb.CompleteDataType.FunctionType

- All Implemented Interfaces:
    Serializable
  Enclosing class:
    CompleteDataType

      public static class CompleteDataType.FunctionType
      extends CompleteDataType

  See Also:
    Serialized Form

- - ### 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
    Constructor and Description
    `FunctionType(Schema arguments, CompleteDataType returnType)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `canAssignFromImpl(CompleteDataType other)` Method for subclasses to override if they have a broader concept of type.
    `boolean` | `equals(Object obj)`
    `boolean` | `equalTypes(CompleteDataType completeType)` Like equals(), but ignores field type names.
    `Schema` | `getArgumentSchema()` For function types, return the argument schema.
    `CompleteDataType` | `getReturnType()` For function types, return the return type of the function.
    `int` | `hashCode()`
    `long` | `rateCoercion(CompleteDataType to)` calculate the coercion score to get coerce this → type - by default returns SCORE_PASS or SCORE_FAIL based on equals
    `String` | `toHumanString(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`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FunctionType

          public FunctionType(Schema arguments,
                              CompleteDataType returnType)

  - ### Method Detail

    - #### toHumanString

          public String toHumanString(SchemaUtil.SchemaProvider schemaProvider)

      Description copied from class: `CompleteDataType`
      Return a String describing the type suitable for error messages.
      Specified by:
        `toHumanString` in class `CompleteDataType`
      Parameters:
        `schemaProvider` - A schema provider to identify named schemas
      Returns:
        param a suitable string

    - #### getArgumentSchema

          public Schema getArgumentSchema()

      Description copied from class: `CompleteDataType`
      For function types, return the argument schema. For other types null is returned.
      Overrides:
        `getArgumentSchema` in class `CompleteDataType`
      Returns:
        the function type's argument schema

    - #### getReturnType

          public CompleteDataType getReturnType()

      Description copied from class: `CompleteDataType`
      For function types, return the return type of the function. For other types, return null.
      Overrides:
        `getReturnType` in class `CompleteDataType`
      Returns:
        the function type's return type

    - #### equals

          public boolean equals(Object obj)

      Specified by:
        `equals` in class `CompleteDataType`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `CompleteDataType`

    - #### equalTypes

          public boolean equalTypes(CompleteDataType completeType)

      Description copied from class: `CompleteDataType`
      Like equals(), but ignores field type names.
      Specified by:
        `equalTypes` in class `CompleteDataType`
      Parameters:
        `completeType` - a complete data type
      Returns:
        type equality

    - #### rateCoercion

          public long rateCoercion(CompleteDataType to)

      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 class `CompleteDataType`
      Parameters:
        `to` - the CType to converse to
      Returns:
        the score, use COp.java as a reference for score constants

    - #### canAssignFromImpl

          protected boolean canAssignFromImpl(CompleteDataType other)

      Method for subclasses to override if they have a broader concept of type.
      Overrides:
        `canAssignFromImpl` in class `CompleteDataType`
      Parameters:
        `other` - the other type
      Returns:
        type assignment compatibility

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.