org.epics.pvmanager.data
Class ValueFactory

java.lang.Object
  extended by org.epics.pvmanager.data.ValueFactory

public class ValueFactory
extends Object

Factory class for all concrete implementation of the types.

The factory methods do not do anything in terms of defensive copy and immutability to the objects, which they are passed as they are. It's the client responsibility to prepare them appropriately, which is automatically done anyway for all objects except collections.

Author:
carcassi

Constructor Summary
ValueFactory()
           
 
Method Summary
static VInt newEInt(Integer value, AlarmSeverity alarmSeverity, AlarmStatus alarmStatus, Integer timeUserTag, TimeStamp timeStamp, VInt oldValue)
          Creates new immutable newDbrCtrlInt by using the metadata from the old value.
static VInt newEInt(Integer value, AlarmSeverity alarmSeverity, AlarmStatus alarmStatus, TimeStamp timeStamp, Integer timeUserTag, Double lowerDisplayLimit, Double lowerAlarmLimit, Double lowerWarningLimit, String units, NumberFormat numberFormat, Double upperWarningLimit, Double upperAlarmLimit, Double upperDisplayLimit, Double lowerCtrlLimit, Double upperCtrlLimit)
          Creates new immutable VInt.
static VDouble newVDouble(Double value, AlarmSeverity alarmSeverity, AlarmStatus alarmStatus, Integer timeUserTag, TimeStamp timeStamp, Display display)
          Creates new immutable new VDouble by using the metadata from the old value.
static VDouble newVDouble(Double value, AlarmSeverity alarmSeverity, AlarmStatus alarmStatus, TimeStamp timeStamp, Integer timeUserTag, Double lowerDisplayLimit, Double lowerAlarmLimit, Double lowerWarningLimit, String units, NumberFormat numberFormat, Double upperWarningLimit, Double upperAlarmLimit, Double upperDisplayLimit, Double lowerCtrlLimit, Double upperCtrlLimit)
          Creates new immutable VDouble.
static VDouble newVDouble(double value, Display display)
          Creates new immutable VDouble by using metadata from the old value, now as timestamp and computing alarm from the metadata range.
static VDouble newVDouble(double value, TimeStamp timeStamp, Display display)
          Creates new immutable VDouble by using the metadata from the old value, and computing the alarm from the metadata range.
static VDoubleArray newVDoubleArray(double[] values, List<Integer> sizes, AlarmSeverity alarmSeverity, AlarmStatus alarmStatus, TimeStamp timeStamp, Integer timeUserTag, Double lowerDisplayLimit, Double lowerAlarmLimit, Double lowerWarningLimit, String units, NumberFormat numberFormat, Double upperWarningLimit, Double upperAlarmLimit, Double upperDisplayLimit, Double lowerCtrlLimit, Double upperCtrlLimit)
           
static VImage newVImage(int height, int width, byte[] data)
           
static VInt newVInt(Integer value, AlarmSeverity alarmSeverity, AlarmStatus alarmStatus, TimeStamp timeStamp, Integer timeUserTag, Double lowerDisplayLimit, Double lowerAlarmLimit, Double lowerWarningLimit, String units, NumberFormat numberFormat, Double upperWarningLimit, Double upperAlarmLimit, Double upperDisplayLimit, Double lowerCtrlLimit, Double upperCtrlLimit)
          Creates new immutable VInt.
static VMultiDouble newVMultiDouble(List<VDouble> values, AlarmSeverity alarmSeverity, AlarmStatus alarmStatus, TimeStamp timeStamp, Integer timeUserTag, Double lowerDisplayLimit, Double lowerCtrlLimit, Double lowerAlarmLimit, Double lowerWarningLimit, String units, NumberFormat format, Double upperWarningLimit, Double upperAlarmLimit, Double upperCtrlLimit, Double upperDisplayLimit)
           
static VStatistics newVStatistics(double average, double stdDev, double min, double max, int nSamples, AlarmSeverity alarmSeverity, AlarmStatus alarmStatus, Integer timeUserTag, TimeStamp timeStamp, VDouble aValue)
          Creates a new VStatistics by taking the metadata from a VDouble.
static VStatistics newVStatistics(double average, double stdDev, double min, double max, int nSamples, AlarmSeverity alarmSeverity, AlarmStatus alarmStatus, TimeStamp timeStamp, Integer timeUserTag, Double lowerDisplayLimit, Double lowerAlarmLimit, Double lowerWarningLimit, String units, NumberFormat numberFormat, Double upperWarningLimit, Double upperAlarmLimit, Double upperDisplayLimit, Double lowerCtrlLimit, Double upperCtrlLimit)
          Creates a new immutable VStatistics.
static VString newVString(String value, AlarmSeverity alarmSeverity, AlarmStatus alarmStatus, TimeStamp timeStamp, Integer timeUserTag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueFactory

public ValueFactory()
Method Detail

newVString

public static VString newVString(String value,
                                 AlarmSeverity alarmSeverity,
                                 AlarmStatus alarmStatus,
                                 TimeStamp timeStamp,
                                 Integer timeUserTag)

newVMultiDouble

public static VMultiDouble newVMultiDouble(List<VDouble> values,
                                           AlarmSeverity alarmSeverity,
                                           AlarmStatus alarmStatus,
                                           TimeStamp timeStamp,
                                           Integer timeUserTag,
                                           Double lowerDisplayLimit,
                                           Double lowerCtrlLimit,
                                           Double lowerAlarmLimit,
                                           Double lowerWarningLimit,
                                           String units,
                                           NumberFormat format,
                                           Double upperWarningLimit,
                                           Double upperAlarmLimit,
                                           Double upperCtrlLimit,
                                           Double upperDisplayLimit)

newVInt

public static VInt newVInt(Integer value,
                           AlarmSeverity alarmSeverity,
                           AlarmStatus alarmStatus,
                           TimeStamp timeStamp,
                           Integer timeUserTag,
                           Double lowerDisplayLimit,
                           Double lowerAlarmLimit,
                           Double lowerWarningLimit,
                           String units,
                           NumberFormat numberFormat,
                           Double upperWarningLimit,
                           Double upperAlarmLimit,
                           Double upperDisplayLimit,
                           Double lowerCtrlLimit,
                           Double upperCtrlLimit)
Creates new immutable VInt.


newVDouble

public static VDouble newVDouble(Double value,
                                 AlarmSeverity alarmSeverity,
                                 AlarmStatus alarmStatus,
                                 TimeStamp timeStamp,
                                 Integer timeUserTag,
                                 Double lowerDisplayLimit,
                                 Double lowerAlarmLimit,
                                 Double lowerWarningLimit,
                                 String units,
                                 NumberFormat numberFormat,
                                 Double upperWarningLimit,
                                 Double upperAlarmLimit,
                                 Double upperDisplayLimit,
                                 Double lowerCtrlLimit,
                                 Double upperCtrlLimit)
Creates new immutable VDouble.


newVDouble

public static VDouble newVDouble(Double value,
                                 AlarmSeverity alarmSeverity,
                                 AlarmStatus alarmStatus,
                                 Integer timeUserTag,
                                 TimeStamp timeStamp,
                                 Display display)
Creates new immutable new VDouble by using the metadata from the old value.


newVDouble

public static VDouble newVDouble(double value,
                                 TimeStamp timeStamp,
                                 Display display)
Creates new immutable VDouble by using the metadata from the old value, and computing the alarm from the metadata range.

Parameters:
value - new numeric value
timeStamp - time stamp
display - metadata
Returns:
new value

newVDouble

public static VDouble newVDouble(double value,
                                 Display display)
Creates new immutable VDouble by using metadata from the old value, now as timestamp and computing alarm from the metadata range.

Parameters:
value - new numeric value
display - metadata
Returns:
new value

newVStatistics

public static VStatistics newVStatistics(double average,
                                         double stdDev,
                                         double min,
                                         double max,
                                         int nSamples,
                                         AlarmSeverity alarmSeverity,
                                         AlarmStatus alarmStatus,
                                         TimeStamp timeStamp,
                                         Integer timeUserTag,
                                         Double lowerDisplayLimit,
                                         Double lowerAlarmLimit,
                                         Double lowerWarningLimit,
                                         String units,
                                         NumberFormat numberFormat,
                                         Double upperWarningLimit,
                                         Double upperAlarmLimit,
                                         Double upperDisplayLimit,
                                         Double lowerCtrlLimit,
                                         Double upperCtrlLimit)
Creates a new immutable VStatistics.


newVStatistics

public static VStatistics newVStatistics(double average,
                                         double stdDev,
                                         double min,
                                         double max,
                                         int nSamples,
                                         AlarmSeverity alarmSeverity,
                                         AlarmStatus alarmStatus,
                                         Integer timeUserTag,
                                         TimeStamp timeStamp,
                                         VDouble aValue)
Creates a new VStatistics by taking the metadata from a VDouble.


newEInt

public static VInt newEInt(Integer value,
                           AlarmSeverity alarmSeverity,
                           AlarmStatus alarmStatus,
                           TimeStamp timeStamp,
                           Integer timeUserTag,
                           Double lowerDisplayLimit,
                           Double lowerAlarmLimit,
                           Double lowerWarningLimit,
                           String units,
                           NumberFormat numberFormat,
                           Double upperWarningLimit,
                           Double upperAlarmLimit,
                           Double upperDisplayLimit,
                           Double lowerCtrlLimit,
                           Double upperCtrlLimit)
Creates new immutable VInt.


newEInt

public static VInt newEInt(Integer value,
                           AlarmSeverity alarmSeverity,
                           AlarmStatus alarmStatus,
                           Integer timeUserTag,
                           TimeStamp timeStamp,
                           VInt oldValue)
Creates new immutable newDbrCtrlInt by using the metadata from the old value.


newVDoubleArray

public static VDoubleArray newVDoubleArray(double[] values,
                                           List<Integer> sizes,
                                           AlarmSeverity alarmSeverity,
                                           AlarmStatus alarmStatus,
                                           TimeStamp timeStamp,
                                           Integer timeUserTag,
                                           Double lowerDisplayLimit,
                                           Double lowerAlarmLimit,
                                           Double lowerWarningLimit,
                                           String units,
                                           NumberFormat numberFormat,
                                           Double upperWarningLimit,
                                           Double upperAlarmLimit,
                                           Double upperDisplayLimit,
                                           Double lowerCtrlLimit,
                                           Double upperCtrlLimit)

newVImage

public static VImage newVImage(int height,
                               int width,
                               byte[] data)


Copyright © 2011. All Rights Reserved.