public class InstantCoder extends AtomicCoder<org.joda.time.Instant>
Coder.Context, Coder.NonDeterministicException| Modifier and Type | Method and Description |
|---|---|
boolean |
consistentWithEquals()
Returns true if the encoded bytes of two objects are
equal only when they are also equal according to
Object.equals(). |
org.joda.time.Instant |
decode(InputStream inStream,
Coder.Context context)
Decodes a value of type
T from the given input stream in
the given context. |
void |
encode(org.joda.time.Instant value,
OutputStream outStream,
Coder.Context context)
Encodes the given value of type
T onto the given output stream
in the given context. |
static InstantCoder |
of() |
getCoderArguments, getInstanceComponentsverifyDeterministicasCloudObject, equals, getComponents, getEncodedElementByteSize, hashCode, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, toString, verifyDeterministic, verifyDeterministicpublic static InstantCoder of()
public void encode(org.joda.time.Instant value,
OutputStream outStream,
Coder.Context context)
throws CoderException,
IOException
CoderT onto the given output stream
in the given context.CoderException - if the value could not be encoded for some reasonIOException - if writing to the OutputStream fails
for some reasonpublic org.joda.time.Instant decode(InputStream inStream, Coder.Context context) throws CoderException, IOException
CoderT from the given input stream in
the given context. Returns the decoded value.CoderException - if the value could not be decoded for some reasonIOException - if reading from the InputStream fails
for some reasonpublic boolean consistentWithEquals()
CoderObject.equals().
(and also implements a compatible Object.hasCode())
This most notably false for arrays. It will generally
be false when Object.equals() compares object identity,
rather than performing a semantic/structural comparison.
consistentWithEquals in interface Coder<org.joda.time.Instant>consistentWithEquals in class StandardCoder<org.joda.time.Instant>