org.epics.pvmanager
Class TimeSupport<T>
java.lang.Object
org.epics.pvmanager.TypeSupport<T>
org.epics.pvmanager.TimeSupport<T>
- Type Parameters:
T
- type for which to add time support
public abstract class TimeSupport<T>
- extends TypeSupport<T>
Strategy class that extract time information from a given type.
- Author:
- carcassi
Constructor Summary |
TimeSupport(Class<T> clazz)
Creates a new support for extracting time information from the given
class. |
Method Summary |
protected abstract TimeStamp |
extractTimestamp(T object)
Extracts the time information from the given object. |
static
|
timestampOf(T value)
Extracts the TimeStamp of the value using the appropriate type support. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeSupport
public TimeSupport(Class<T> clazz)
- Creates a new support for extracting time information from the given
class.
- Parameters:
clazz
- the type on which to add support
timestampOf
public static <T> TimeStamp timestampOf(T value)
- Extracts the TimeStamp of the value using the appropriate type support.
- Type Parameters:
T
- the type of the value- Parameters:
value
- the value from which to extract the timestamp
- Returns:
- the extracted timestamp
extractTimestamp
protected abstract TimeStamp extractTimestamp(T object)
- Extracts the time information from the given object.
- Parameters:
object
- object on which to extract time
- Returns:
- the time of the object or null if not available
Copyright © 2011. All Rights Reserved.