org.fudgemsg.types.secondary
Class JSR310OffsetDateFieldType
java.lang.Object
org.fudgemsg.FudgeFieldType<SecondaryType>
org.fudgemsg.types.SecondaryFieldTypeBase<SecondaryType,PrimitiveType,PrimitiveType>
org.fudgemsg.types.SecondaryFieldType<OffsetDate,FudgeDateTime>
org.fudgemsg.types.secondary.JSR310OffsetDateFieldType
- All Implemented Interfaces:
- Serializable, FudgeTypeConverter<FudgeDateTime,OffsetDate>
public class JSR310OffsetDateFieldType
- extends SecondaryFieldType<OffsetDate,FudgeDateTime>
Secondary type for JSR-310 object conversion.
- See Also:
- Serialized Form
INSTANCE
public static final JSR310OffsetDateFieldType INSTANCE
- Singleton instance of the type.
secondaryToPrimary
public FudgeDateTime secondaryToPrimary(OffsetDate 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<OffsetDate,FudgeDateTime,FudgeDateTime>
- Parameters:
object
- the secondary instance
- Returns:
- the underlying Fudge data to write out
primaryToSecondary
public OffsetDate 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,OffsetDate>
- Overrides:
primaryToSecondary
in class SecondaryFieldType<OffsetDate,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