public class ValueUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Alarm |
alarmOf(Object obj)
Extracts the alarm information if present.
|
static Display |
displayOf(Object obj)
Extracts the display information if present.
|
static Double |
normalize(Number value,
Display display)
Normalizes the given value according to the given display information.
|
static Double |
normalize(Number value,
Number lowValue,
Number highValue)
Normalizes the given value according to the given range;
|
static Double |
normalizedNumericValueOf(Object obj)
Extracts the numericValueOf the object and normalizes according
to the display range.
|
static Double |
numericValueOf(Object obj)
Extracts a numeric value for the object.
|
static <T extends Time> |
timeComparator()
Returns a comparator with the order defined by the timestamp.
|
static Time |
timeOf(Object obj)
Extracts the time information if present.
|
static BufferedImage |
toImage(VImage vImage)
Converts a VImage to an AWT BufferedImage, so that it can be displayed.
|
static VImage |
toVImage(BufferedImage image)
Converts an AWT BufferedImage to a VImage.
|
static Class<?> |
typeOf(Object obj)
Returns the type of the object by returning the class object of one
of the VXxx interfaces.
|
public static Class<?> typeOf(Object obj)
obj
- an object implementing a standard typepublic static Alarm alarmOf(Object obj)
obj
- an object implementing a standard typepublic static Time timeOf(Object obj)
obj
- an object implementing a standard typepublic static Display displayOf(Object obj)
obj
- an object implementing a standard typepublic static Double normalizedNumericValueOf(Object obj)
obj
- an object implementing a standard typepublic static Double normalize(Number value, Display display)
value
- a valuedisplay
- the display informationpublic static Double normalize(Number value, Number lowValue, Number highValue)
value
- a valuelowValue
- the lowest value in the rangehighValue
- the highest value in the rangepublic static Double numericValueOf(Object obj)
obj
- an object implementing a standard typepublic static BufferedImage toImage(VImage vImage)
vImage
- the image to be convertedpublic static VImage toVImage(BufferedImage image)
Currently, only TYPE_3BYTE_BGR is supported
image
- public static <T extends Time> Comparator<T> timeComparator()
T
- a Time typeCopyright © 2012. All Rights Reserved.