org.fudgemsg.types.secondary
Class JSR310OffsetDateTimeFieldType

java.lang.Object
  extended by org.fudgemsg.FudgeFieldType<SecondaryType>
      extended by org.fudgemsg.types.SecondaryFieldTypeBase<SecondaryType,PrimitiveType,PrimitiveType>
          extended by org.fudgemsg.types.SecondaryFieldType<OffsetDateTime,FudgeDateTime>
              extended by org.fudgemsg.types.secondary.JSR310OffsetDateTimeFieldType
All Implemented Interfaces:
Serializable, FudgeTypeConverter<FudgeDateTime,OffsetDateTime>

public class JSR310OffsetDateTimeFieldType
extends SecondaryFieldType<OffsetDateTime,FudgeDateTime>

Secondary type for JSR-310 object conversion.

See Also:
Serialized Form

Field Summary
static JSR310OffsetDateTimeFieldType INSTANCE
          Singleton instance of the type.
 
Method Summary
 OffsetDateTime primaryToSecondary(FudgeDateTime object)
          Converts Fudge primitive data to the secondary type.
 FudgeDateTime secondaryToPrimary(OffsetDateTime object)
          Converts an object from the secondary type to a primitive Fudge type for writing.
 
Methods inherited from class org.fudgemsg.types.SecondaryFieldType
canConvertPrimary, readValue, writeValue
 
Methods inherited from class org.fudgemsg.types.SecondaryFieldTypeBase
getPrimaryType, getVariableSize
 
Methods inherited from class org.fudgemsg.FudgeFieldType
equals, getFixedSize, getJavaType, getTypeId, hashCode, isVariableSize, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final JSR310OffsetDateTimeFieldType INSTANCE
Singleton instance of the type.

Method Detail

secondaryToPrimary

public FudgeDateTime secondaryToPrimary(OffsetDateTime object)
Converts an object from the secondary type to a primitive Fudge type for writing. An implementation may assume that the object parameter is not null.

Specified by:
secondaryToPrimary in class SecondaryFieldTypeBase<OffsetDateTime,FudgeDateTime,FudgeDateTime>
Parameters:
object - the secondary instance
Returns:
the underlying Fudge data to write out

primaryToSecondary

public OffsetDateTime primaryToSecondary(FudgeDateTime object)
Converts Fudge primitive data to the secondary type. This is an optional operation - it will only be invoked if the user attempts to convert from the underlying type used for transport back to the secondary type. An implementation may assume that the object parameter is not null.

Specified by:
primaryToSecondary in interface FudgeTypeConverter<FudgeDateTime,OffsetDateTime>
Overrides:
primaryToSecondary in class SecondaryFieldType<OffsetDateTime,FudgeDateTime>
Parameters:
object - the Fudge data
Returns:
a secondary type instance


Copyright 2009-Present by OpenGamma Inc. and individual contributors
Released under the Apache License, Version 2.0