com.streambase.sb.unittest

## Interface TupleMaker<T>

- All Known Implementing Classes:
    AbstractTupleMaker, CSVTupleMaker, JSONSingleQuotesTupleMaker, JSONTupleMaker, ObjectArrayTupleMaker

      public interface TupleMaker<T>

  Interface for constructing tuples from data. A TupleMarker is a straight forward way of creating a tuple using a schema. The maker user the fields in the schema to create the Tuple. For instance, say you have a schema like the following:

           name : String
           address : String
           phone : string

  You could use the tuple maker like this:

          Tuple tuple = tupleMaker.createTuple(schema, "Joe Smith", "101 Main St", "508-555-1212");

  Examine the subclasses of TupleMaker in the see section for concrete implementations.
  Since:
    6.6
  See Also:
    `JSONSingleQuotesTupleMaker`, `JSONTupleMaker`, `ObjectArrayTupleMaker`, `CSVTupleMaker`

- - ### Method Summary

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

- - ### Method Detail

    - #### createTuple

          Tuple createTuple(Schema schema,
                            T t)
                     throws StreamBaseException

      create a `Tuple`s from an input object
      Parameters:
        `schema` - the schema for the tuple
        `t` - the input data to build it from
      Returns:
        the result tuple
      Throws:
        `StreamBaseException`

    - #### createTuples

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

      create multiple `Tuple`s from input objects
      Parameters:
        `schema` - the schema for the tuple
        `t` - the input data to build it from
      Returns:
        the result tuple
      Throws:
        `StreamBaseException`

    - #### createTuples

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

      create multiple `Tuple`s from input objects
      Parameters:
        `schema` - the schema for the tuple
        `t` - the input data to build it from
      Returns:
        the result tuple
      Throws:
        `StreamBaseException`

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