Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cascading.pipe.assembly
Class Coerce

    java.lang.Object
      cascading.pipe.Pipe
          cascading.pipe.SubAssembly
              cascading.pipe.assembly.Coerce

All Implemented Interfaces:
  FlowElement, Serializable

    public class Coerce

extends SubAssembly

Class Coerce is a `SubAssembly` that will coerce all incoming `Tuple` values to the given types.

If the given type is a primitive (`long`), and the tuple value is null, `0` is returned. If the type is an Object (`java.lang.Long`), and the tuple value is `null`, `null` is returned.

Coerce encapsulates the `Identity` function.

See Also:
  `SubAssembly`, `Identity`, Serialized Form

Field Summary

Fields inherited from class cascading.pipe.Pipe
`configDef, name, parent, stepConfigDef`

Constructor Summary
`Coerce(Pipe previous, Class... types)` Constructor Coerce creates a new Coerce instance that will coerce all input Tuple values.
`Coerce(Pipe previous, Fields coerceFields)` Constructor Coerce creates a new Coerce instance that will only coerce the given coerceFields Tuple values.
`Coerce(Pipe previous, Fields coerceFields, Class... types)` Constructor Coerce creates a new Coerce instance that will only coerce the given coerceFields Tuple values.

Method Summary

Methods inherited from class cascading.pipe.SubAssembly
`getName, getPrevious, getTailNames, getTails, setPrevious, setTails, unwind`

Methods inherited from class cascading.pipe.Pipe
`equals, getConfigDef, getHeads, getParent, getStepConfigDef, getTrace, hasConfigDef, hashCode, hasStepConfigDef, id, isEquivalentTo, named, names, outgoingScopeFor, pipes, print, printInternal, resolveIncomingOperationArgumentFields, resolveIncomingOperationPassThroughFields, setParent, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Coerce

    @ConstructorProperties(value={"previous","types"})
    public Coerce(Pipe previous,
                                             Class... types)

  Constructor Coerce creates a new Coerce instance that will coerce all input Tuple values.

  Parameters:
    `previous` - of type Pipe
    `types` - of type Class...

### Coerce

    @ConstructorProperties(value={"previous","coerceFields","types"})
    public Coerce(Pipe previous,
                                             Fields coerceFields,
                                             Class... types)

  Constructor Coerce creates a new Coerce instance that will only coerce the given coerceFields Tuple values.

  Note the resulting output Tuple will contain all the original incoming Fields.

  Parameters:
    `previous` - of type Pipe
    `coerceFields` - of type Fields
    `types` - of type Class...

### Coerce

    @ConstructorProperties(value={"previous","coerceFields"})
    public Coerce(Pipe previous,
                                             Fields coerceFields)

  Constructor Coerce creates a new Coerce instance that will only coerce the given coerceFields Tuple values.

  The given `coerceFields` instance must contain field type information, otherwise an `IllegalArgumentException` will be thrown.

  Note the resulting output Tuple will contain all the original incoming Fields.

  Parameters:
    `previous` - of type Pipe
    `coerceFields` - of type Fields

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007-2013 Concurrent, Inc. All Rights Reserved.