com.streambase.sb.unittest

## Class AbstractTupleMaker<T>

- java.lang.Object
- - com.streambase.sb.unittest.AbstractTupleMaker<T>

- All Implemented Interfaces:
    TupleMaker<T>
  Direct Known Subclasses:
    CSVTupleMaker, JSONTupleMaker, ObjectArrayTupleMaker

      public abstract class AbstractTupleMaker<T>
      extends Object
      implements TupleMaker<T>

  A convenience class which implements all of the methods of `TupleMaker` in terms of `AbstractTupleMaker.createTuple(Schema, Object)`.
  Since:
    6.6

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractTupleMaker()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract Tuple` | `createTuple(Schema schema, T t)` create a `Tuple`s from an input object
    `List<Tuple>` | `createTuples(Schema schema, Collection<T> ts)` create multiple `Tuple`s from input objects
    `List<Tuple>` | `createTuples(Schema schema, T... ts)` create multiple `Tuple`s from input objects

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractTupleMaker

          public AbstractTupleMaker()

  - ### Method Detail

    - #### createTuple

          public abstract Tuple createTuple(Schema schema,
                                            T t)
                                     throws StreamBaseException

      Description copied from interface: `TupleMaker`
      create a `Tuple`s from an input object
      Specified by:
        `createTuple` in interface `TupleMaker<T>`
      Parameters:
        `schema` - the schema for the tuple
        `t` - the input data to build it from
      Returns:
        the result tuple
      Throws:
        `StreamBaseException`

    - #### createTuples

          public List<Tuple> createTuples(Schema schema,
                                          T... ts)
                                   throws StreamBaseException

      Description copied from interface: `TupleMaker`
      create multiple `Tuple`s from input objects
      Specified by:
        `createTuples` in interface `TupleMaker<T>`
      Parameters:
        `schema` - the schema for the tuple
        `ts` - the input data to build it from
      Returns:
        the result tuple
      Throws:
        `StreamBaseException`

    - #### createTuples

          public List<Tuple> createTuples(Schema schema,
                                          Collection<T> ts)
                                   throws StreamBaseException

      Description copied from interface: `TupleMaker`
      create multiple `Tuple`s from input objects
      Specified by:
        `createTuples` in interface `TupleMaker<T>`
      Parameters:
        `schema` - the schema for the tuple
        `ts` - the input data to build it from
      Returns:
        the result tuple
      Throws:
        `StreamBaseException`

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