com.google.cloud.dataflow.sdk.coders

## Class DeterministicStandardCoder<T>

- java.lang.Object
- - com.google.cloud.dataflow.sdk.coders.StandardCoder<T>
  - - com.google.cloud.dataflow.sdk.coders.DeterministicStandardCoder<T>

Type Parameters:
  `T` - the type of the values being transcoded

All Implemented Interfaces:
  Coder<T>, Serializable

Direct Known Subclasses:
  AtomicCoder

    public abstract class DeterministicStandardCoder<T>
    extends StandardCoder<T>

A `DeterministicStandardCoder` is a `StandardCoder` that is deterministic, in the sense that for objects considered equal according to `Object.equals(Object)`, the encoded bytes are also equal.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from interface com.google.cloud.dataflow.sdk.coders.Coder

`Coder.Context, Coder.NonDeterministicException`

### Constructor Summary

Constructors
`protected` `DeterministicStandardCoder()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `verifyDeterministic()` Throw `Coder.NonDeterministicException` if the coding is not deterministic.

### Methods inherited from class com.google.cloud.dataflow.sdk.coders.StandardCoder

`asCloudObject, consistentWithEquals, equals, getAllowedEncodings, getComponents, getEncodedElementByteSize, getEncodingId, hashCode, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, toString, verifyDeterministic, verifyDeterministic`

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

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

### Methods inherited from interface com.google.cloud.dataflow.sdk.coders.Coder

`decode, encode, getCoderArguments`

### Constructor Detail

#### DeterministicStandardCoder

    protected DeterministicStandardCoder()

### Method Detail

#### verifyDeterministic

    public void verifyDeterministic()
                             throws Coder.NonDeterministicException

Throw `Coder.NonDeterministicException` if the coding is not deterministic.

In order for a `Coder` to be considered deterministic, the following must be true:

- two values that compare as equal (via `Object.equals()` or `Comparable.compareTo()`, if supported) have the same encoding.
- the `Coder` always produces a canonical encoding, which is the same for an instance of an object even if produced on different computers at different times.

Throws:
  `NonDeterministicException` - never, unless overridden. A `DeterministicStandardCoder` is presumed deterministic.
  `Coder.NonDeterministicException` - if this coder is not deterministic.