Constructor and Description |
---|
VType() |
Modifier and Type | Method and Description |
---|---|
static Alarm |
alarmOf(Object value)
Null and non-VType safe utility to extracts alarm information.
|
static Alarm |
alarmOf(Object value,
boolean connected)
Null and non-VType safe utility to extracts alarm information for a
connection.
|
static Alarm |
highestAlarmOf(List<?> values,
boolean ignoreNull)
Returns the value with highest severity.
|
static VType |
toVType(Object javaObject)
Converts a standard java type to VTypes.
|
static VType |
toVType(Object javaObject,
Alarm alarm)
Converts a standard java type to VTypes.
|
static VType |
toVType(Object javaObject,
Alarm alarm,
Time time,
Display display)
Converts a standard java type to VTypes.
|
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 highestAlarmOf(List<?> values, boolean ignoreNull)
Alarm.noValue()
).values
- a list of valuesignoreNull
- true to simply skip null valuespublic static VType toVType(Object javaObject)
toVType(java.lang.Object, org.diirt.vtype.next.Alarm, org.diirt.vtype.next.Time, org.diirt.vtype.next.Display)
with no alarm, time now and no display.javaObject
- the value to wrappublic static VType toVType(Object javaObject, Alarm alarm)
toVType(java.lang.Object, org.diirt.vtype.next.Alarm, org.diirt.vtype.next.Time, org.diirt.vtype.next.Display)
with the given alarm, time now and no display.javaObject
- the value to wrapalarm
- the alarmpublic static VType toVType(Object javaObject, Alarm alarm, Time time, Display display)
Types are converted as follow:
javaObject
- the value to wrapalarm
- the alarmtime
- the timedisplay
- the displaypublic static Alarm alarmOf(Object value)
AlarmProvider
, the associate alarm is returned.AlarmProvider
, Alarm.NONE
is returned.Alarm.NO_VALUE
is returned.value
- the valuepublic static Alarm alarmOf(Object value, boolean connected)
AlarmProvider
, the associate alarm is returned.AlarmProvider
, Alarm.NONE
is returned.Alarm.NO_VALUE
is returned.Alarm.DISCONNECTED
is returned.value
- a valueconnected
- the connection statusCopyright © 2015. All rights reserved.