org.fudgemsg.types.secondary
Class JSR310LocalTimeFieldType

java.lang.Object
  extended by org.fudgemsg.FudgeFieldType<SecondaryType>
      extended by org.fudgemsg.types.SecondaryFieldTypeBase<LocalTime,TimeProvider,FudgeTime>
          extended by org.fudgemsg.types.secondary.JSR310LocalTimeFieldType
All Implemented Interfaces:
Serializable, FudgeTypeConverter<TimeProvider,LocalTime>

public class JSR310LocalTimeFieldType
extends SecondaryFieldTypeBase<LocalTime,TimeProvider,FudgeTime>

Secondary type for JSR-310 object conversion.

See Also:
Serialized Form

Field Summary
static JSR310LocalTimeFieldType INSTANCE
          Singleton instance of the type.
 
Method Summary
 boolean canConvertPrimary(Class<? extends TimeProvider> clazz)
          Returns true if this converter can manipulate the requested class.
 LocalTime primaryToSecondary(TimeProvider object)
          Converts an object to the secondary type this converter supports.
 FudgeTime secondaryToPrimary(LocalTime object)
          Converts an object from the secondary type to a primitive Fudge type for writing.
 
Methods inherited from class org.fudgemsg.types.SecondaryFieldTypeBase
getPrimaryType, getVariableSize, readValue, writeValue
 
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 JSR310LocalTimeFieldType INSTANCE
Singleton instance of the type.

Method Detail

secondaryToPrimary

public FudgeTime secondaryToPrimary(LocalTime 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<LocalTime,TimeProvider,FudgeTime>
Parameters:
object - the secondary instance
Returns:
the underlying Fudge data to write out

primaryToSecondary

public LocalTime primaryToSecondary(TimeProvider object)
Converts an object to the secondary type this converter supports.

Parameters:
object - to convert
Returns:
the converted object

canConvertPrimary

public boolean canConvertPrimary(Class<? extends TimeProvider> clazz)
Returns true if this converter can manipulate the requested class.

Parameters:
clazz - to query
Returns:
true if a call to FudgeTypeConverter.primaryToSecondary(Primary) will succeed, false if it would fail


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