Class DataType.Checklist

java.lang.Object
com.streambase.sb.DataType.Checklist
Enclosing class:
DataType

public static class DataType.Checklist extends Object
Validate types against registered types
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    check(DataType... types)
    Check types
    void
    Check types
    Map<DataType,com.streambase.sb.DataType.Registry.Functor>
    return all of the factories
    void
    Indicate that all factories have been added.
    com.streambase.sb.DataType.Registry.Functor
    Return the factory for the specified CompleteDataType.
    com.streambase.sb.DataType.Registry.Functor
    get(DataType type)
    Return the factory for the specified DataType.
    com.streambase.sb.DataType.Registry.Functor
    Return the factory for the type of the specified Field.
    void
    register(DataType type, com.streambase.sb.DataType.Registry.Functor factory)
    Register the specified factory associated with the specified DataType.
    void
    register(Collection<DataType> types, com.streambase.sb.DataType.Registry.Functor factory)
    Convenience method to register the same factory with multiple data types.
    void
    register(Map<DataType,com.streambase.sb.DataType.Registry.Functor> factories)
    Register the specified factories with the specified DataTypes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Checklist

      public Checklist()
  • Method Details

    • check

      public void check(DataType... types)
      Check types
      Parameters:
      types - types to validate
    • check

      public void check(Collection<DataType> types)
      Check types
      Parameters:
      types - types to validate
    • finishedRegistering

      public void finishedRegistering()
      Indicate that all factories have been added. A runtime error will be thrown if a factory has not been registered for one or more DataType's.
    • register

      public void register(DataType type, com.streambase.sb.DataType.Registry.Functor factory)
      Register the specified factory associated with the specified DataType.
      Parameters:
      type - data type associated with a factory
      factory - a factory
    • register

      public void register(Map<DataType,com.streambase.sb.DataType.Registry.Functor> factories)
      Register the specified factories with the specified DataTypes.
      Parameters:
      factories - factories associated with a data type
      Since:
      6.6
    • register

      public void register(Collection<DataType> types, com.streambase.sb.DataType.Registry.Functor factory)
      Convenience method to register the same factory with multiple data types.
      Parameters:
      types - the set of types; callers should consider using an EnumSet<DataType>
      factory - factory for the data types
    • get

      public com.streambase.sb.DataType.Registry.Functor get(DataType type)
      Return the factory for the specified DataType.
      Parameters:
      type - the DataType
      Returns:
      the factory
    • get

      public com.streambase.sb.DataType.Registry.Functor get(CompleteDataType type)
      Return the factory for the specified CompleteDataType.
      Parameters:
      type - the CompleteDataType
      Returns:
      the factory
    • get

      public com.streambase.sb.DataType.Registry.Functor get(Schema.Field field)
      Return the factory for the type of the specified Field.
      Parameters:
      field - the Field
      Returns:
      the factory
    • factories

      public Map<DataType,com.streambase.sb.DataType.Registry.Functor> factories()
      return all of the factories
      Returns:
      the factories