@Test public void newDisplay2() { ArrayDimensionDisplay display = newDisplay(new ArrayDouble(-2, -1, 0, 1, 2), "m"); assertThat(display.getUnits(), equalTo("m")); assertThat(display.getCellBoundaries(), equalTo((ListNumber) new ArrayDouble(-2, -1, 0, 1, 2))); }
public static Display newDisplay(final Double lowerDisplayLimit, final Double lowerAlarmLimit, final Double lowerWarningLimit, final String units, final NumberFormat numberFormat, final Double upperWarningLimit, final Double upperAlarmLimit, final Double upperDisplayLimit, final Double lowerCtrlLimit, final Double upperCtrlLimit) { return new Display() { @Override public Double getLowerCtrlLimit() { return lowerCtrlLimit; } @Override public Double getUpperCtrlLimit() { return upperCtrlLimit; } @Override public Double getLowerDisplayLimit() { return lowerDisplayLimit; } @Override public Double getLowerAlarmLimit() { return lowerAlarmLimit; } @Override public Double getLowerWarningLimit() { return lowerWarningLimit; } @Override public String getUnits() { return units; } @Override public NumberFormat getFormat() { return numberFormat; } @Override public Double getUpperWarningLimit() { return upperWarningLimit; } @Override public Double getUpperAlarmLimit() { return upperAlarmLimit; } @Override public Double getUpperDisplayLimit() { return upperDisplayLimit; } }; }
ValueFactory { public static Display newDisplay(final Double lowerDisplayLimit, final Double lowerAlarmLimit, final Double lowerWarningLimit, final String units, final NumberFormat numberFormat, final Double upperWarningLimit, final Double upperAlarmLimit, final Double upperDisplayLimit, final Double lowerCtrlLimit, final Double upperCtrlLimit) { return new Display() { @Override public Double getLowerCtrlLimit() { return lowerCtrlLimit; } @Override public Double getUpperCtrlLimit() { return upperCtrlLimit; } @Override public Double getLowerDisplayLimit() { return lowerDisplayLimit; } @Override public Double getLowerAlarmLimit() { return lowerAlarmLimit; } @Override public Double getLowerWarningLimit() { return lowerWarningLimit; } @Override public String getUnits() { return units; } @Override public NumberFormat getFormat() { return numberFormat; } @Override public Double getUpperWarningLimit() { return upperWarningLimit; } @Override public Double getUpperAlarmLimit() { return upperAlarmLimit; } @Override public Double getUpperDisplayLimit() { return upperDisplayLimit; } }; } }
ValueFactory { public static Display newDisplay(final Double lowerDisplayLimit, final Double lowerAlarmLimit, final Double lowerWarningLimit, final String units, final NumberFormat numberFormat, final Double upperWarningLimit, final Double upperAlarmLimit, final Double upperDisplayLimit, final Double lowerCtrlLimit, final Double upperCtrlLimit) { return new Display() { @Override public Double getLowerCtrlLimit() { return lowerCtrlLimit; } @Override public Double getUpperCtrlLimit() { return upperCtrlLimit; } @Override public Double getLowerDisplayLimit() { return lowerDisplayLimit; } @Override public Double getLowerAlarmLimit() { return lowerAlarmLimit; } @Override public Double getLowerWarningLimit() { return lowerWarningLimit; } @Override public String getUnits() { return units; } @Override public NumberFormat getFormat() { return numberFormat; } @Override public Double getUpperWarningLimit() { return upperWarningLimit; } @Override public Double getUpperAlarmLimit() { return upperAlarmLimit; } @Override public Double getUpperDisplayLimit() { return upperDisplayLimit; } }; }  }
ValueFactory { public static Display newDisplay(final Double lowerDisplayLimit, final Double lowerAlarmLimit, final Double lowerWarningLimit, final String units, final NumberFormat numberFormat, final Double upperWarningLimit, final Double upperAlarmLimit, final Double upperDisplayLimit, final Double lowerCtrlLimit, final Double upperCtrlLimit) { return new Display() { @Override public Double getLowerCtrlLimit() { return lowerCtrlLimit; } @Override public Double getUpperCtrlLimit() { return upperCtrlLimit; } @Override public Double getLowerDisplayLimit() { return lowerDisplayLimit; } @Override public Double getLowerAlarmLimit() { return lowerAlarmLimit; } @Override public Double getLowerWarningLimit() { return lowerWarningLimit; } @Override public String getUnits() { return units; } @Override public NumberFormat getFormat() { return numberFormat; } @Override public Double getUpperWarningLimit() { return upperWarningLimit; } @Override public Double getUpperAlarmLimit() { return upperAlarmLimit; } @Override public Double getUpperDisplayLimit() { return upperDisplayLimit; } }; }  static VString newVString(final String value, final Alarm alarm, final Time time); static VBoolean newVBoolean(final boolean value, final Alarm alarm, final Time time); static VMultiDouble newVMultiDouble(List<VDouble> values, final Alarm alarm, final Time time, final Display display); static VLong newVLong(final Long value, final Alarm alarm, final Time time, final Display display); static VInt newVInt(final Integer value, final Alarm alarm, final Time time, final Display display); static VShort newVShort(final Short value, final Alarm alarm, final Time time, final Display display); static VByte newVByte(final Byte value, final Alarm alarm, final Time time, final Display display); static Alarm newAlarm(final AlarmSeverity alarmSeverity, final String alarmName); static Alarm alarmNone(); static Alarm newAlarm(Number value, Display display); static Time newTime(final Instant timestamp, final Integer timeUserTag, final boolean timeValid); static Time newTime(final Instant timestamp); static Time timeNow(); static Display newDisplay(final Double lowerDisplayLimit, final Double lowerAlarmLimit, final Double lowerWarningLimit,
            final String units, final NumberFormat numberFormat, final Double upperWarningLimit,
            final Double upperAlarmLimit, final Double upperDisplayLimit,
            final Double lowerCtrlLimit, final Double upperCtrlLimit); static ArrayDimensionDisplay newDisplay(final ListNumber boundaries, final String unit); static ArrayDimensionDisplay newDisplay(final ListNumber boundaries, final boolean reversed, final String unit); static ArrayDimensionDisplay newDisplay(final int size, final ListNumberProvider boundaryProvider, final boolean invert); static ArrayDimensionDisplay newDisplay(final int size, final ListNumberProvider boundaryProvider); static ArrayDimensionDisplay newDisplay(int nCells); static Display displayNone(); static Display displayBoolean(); static VNumber newVNumber(Number value, Alarm alarm, Time time, Display display); static VDouble newVDouble(final Double value, final Alarm alarm, final Time time, final Display display); static VDouble newVDouble(Double value, Time time, Display display); static VDouble newVDouble(Double value, Display display); static VDouble newVDouble(Double value); static VDouble newVDouble(Double value, Time time); static VFloat newVFloat(final Float value, final Alarm alarm, final Time time, final Display display); static VEnum newVEnum(int index, List<String> labels, Alarm alarm, Time time); static VStatistics newVStatistics(final double average, final double stdDev,
            final double min, final double max, final int nSamples, final Alarm alarm,
            final Time time, final Display display); static VNumberArray newVNumberArray(final ListNumber data, final Alarm alarm, final Time time, final Display display); static VNumberArray newVNumberArray(final ListNumber data, final ListInt sizes, final List<ArrayDimensionDisplay> dimensionDisplay,
            final Alarm alarm, final Time time, final Display display); static VNumberArray ndArray(VNumberArray data, ArrayDimensionDisplay... dimensions); static VDoubleArray newVDoubleArray(ListDouble data, Alarm alarm, Time time, Display display); static VFloatArray newVFloatArray(ListFloat data, Alarm alarm, Time time, Display display); static VImage newVImage(int height, int width, byte[] data); static VImage newVImage(int height, int width, byte[] data, Alarm alarm, Time time); static VImage newVImage(int height, int width, final ListNumber data, VImageDataType imageDataType, Alarm alarm, Time time); static VLongArray newVLongArray(final ListLong values, Alarm alarm, Time time, Display display); static VIntArray newVIntArray(final ListInt values, Alarm alarm, Time time, Display display); static VShortArray newVShortArray(final ListShort values, Alarm alarm, Time time, Display display); static VByteArray newVByteArray(final ListByte values, Alarm alarm, Time time, Display display); static VEnumArray newVEnumArray(ListInt indexes, List<String> labels, Alarm alarm, Time time); static VBooleanArray newVBooleanArray(ListBoolean data, Alarm alarm, Time time); static VStringArray newVStringArray(List<String> data, Alarm alarm, Time time); static VTable newVTable(List<Class<?>> types, List<String> names, List<Object> values); @Deprecated static VType wrapValue(Object value); @Deprecated static VType wrapValue(Object value, Alarm alarm); static VType toVType(Object javaObject); static VType toVType(Object javaObject, Alarm alarm, Time time, Display display); static VType toVTypeChecked(Object javaObject); static VType toVTypeChecked(Object javaObject, Alarm alarm, Time time, Display display); }
ValueFactory { public static Display newDisplay(final Double lowerDisplayLimit, final Double lowerAlarmLimit, final Double lowerWarningLimit, final String units, final NumberFormat numberFormat, final Double upperWarningLimit, final Double upperAlarmLimit, final Double upperDisplayLimit, final Double lowerCtrlLimit, final Double upperCtrlLimit) { return new Display() { @Override public Double getLowerCtrlLimit() { return lowerCtrlLimit; } @Override public Double getUpperCtrlLimit() { return upperCtrlLimit; } @Override public Double getLowerDisplayLimit() { return lowerDisplayLimit; } @Override public Double getLowerAlarmLimit() { return lowerAlarmLimit; } @Override public Double getLowerWarningLimit() { return lowerWarningLimit; } @Override public String getUnits() { return units; } @Override public NumberFormat getFormat() { return numberFormat; } @Override public Double getUpperWarningLimit() { return upperWarningLimit; } @Override public Double getUpperAlarmLimit() { return upperAlarmLimit; } @Override public Double getUpperDisplayLimit() { return upperDisplayLimit; } }; }  static VString newVString(final String value, final Alarm alarm, final Time time); static VBoolean newVBoolean(final boolean value, final Alarm alarm, final Time time); static VMultiDouble newVMultiDouble(List<VDouble> values, final Alarm alarm, final Time time, final Display display); static VLong newVLong(final Long value, final Alarm alarm, final Time time, final Display display); static VInt newVInt(final Integer value, final Alarm alarm, final Time time, final Display display); static VShort newVShort(final Short value, final Alarm alarm, final Time time, final Display display); static VByte newVByte(final Byte value, final Alarm alarm, final Time time, final Display display); static Alarm newAlarm(final AlarmSeverity alarmSeverity, final String alarmName); static Alarm alarmNone(); static Alarm newAlarm(Number value, Display display); static Time newTime(final Instant timestamp, final Integer timeUserTag, final boolean timeValid); static Time newTime(final Instant timestamp); static Time timeNow(); static Display newDisplay(final Double lowerDisplayLimit, final Double lowerAlarmLimit, final Double lowerWarningLimit,
            final String units, final NumberFormat numberFormat, final Double upperWarningLimit,
            final Double upperAlarmLimit, final Double upperDisplayLimit,
            final Double lowerCtrlLimit, final Double upperCtrlLimit); static ArrayDimensionDisplay newDisplay(final ListNumber boundaries, final String unit); static ArrayDimensionDisplay newDisplay(final ListNumber boundaries, final boolean reversed, final String unit); static ArrayDimensionDisplay newDisplay(final int size, final ListNumberProvider boundaryProvider, final boolean invert); static ArrayDimensionDisplay newDisplay(final int size, final ListNumberProvider boundaryProvider); static ArrayDimensionDisplay newDisplay(int nCells); static Display displayNone(); static Display displayBoolean(); static VNumber newVNumber(Number value, Alarm alarm, Time time, Display display); static VDouble newVDouble(final Double value, final Alarm alarm, final Time time, final Display display); static VDouble newVDouble(Double value, Time time, Display display); static VDouble newVDouble(Double value, Display display); static VDouble newVDouble(Double value); static VDouble newVDouble(Double value, Time time); static VFloat newVFloat(final Float value, final Alarm alarm, final Time time, final Display display); static VEnum newVEnum(int index, List<String> labels, Alarm alarm, Time time); static VStatistics newVStatistics(final double average, final double stdDev,
            final double min, final double max, final int nSamples, final Alarm alarm,
            final Time time, final Display display); static VNumberArray newVNumberArray(final ListNumber data, final Alarm alarm, final Time time, final Display display); static VNumberArray newVNumberArray(final ListNumber data, final ListInt sizes, final List<ArrayDimensionDisplay> dimensionDisplay,
            final Alarm alarm, final Time time, final Display display); static VNumberArray ndArray(VNumberArray data, ArrayDimensionDisplay... dimensions); static VDoubleArray newVDoubleArray(ListDouble data, Alarm alarm, Time time, Display display); static VFloatArray newVFloatArray(ListFloat data, Alarm alarm, Time time, Display display); static VImage newVImage(int height, int width, byte[] data); static VImage newVImage(int height, int width, byte[] data, Alarm alarm, Time time); static VImage newVImage(int height, int width, final ListNumber data, VImageDataType imageDataType, Alarm alarm, Time time); static VLongArray newVLongArray(final ListLong values, Alarm alarm, Time time, Display display); static VIntArray newVIntArray(final ListInt values, Alarm alarm, Time time, Display display); static VShortArray newVShortArray(final ListShort values, Alarm alarm, Time time, Display display); static VByteArray newVByteArray(final ListByte values, Alarm alarm, Time time, Display display); static VEnumArray newVEnumArray(ListInt indexes, List<String> labels, Alarm alarm, Time time); static VBooleanArray newVBooleanArray(ListBoolean data, Alarm alarm, Time time); static VStringArray newVStringArray(List<String> data, Alarm alarm, Time time); static VTable newVTable(List<Class<?>> types, List<String> names, List<Object> values); @Deprecated static VType wrapValue(Object value); @Deprecated static VType wrapValue(Object value, Alarm alarm); static VType toVType(Object javaObject); static VType toVType(Object javaObject, Alarm alarm, Time time, Display display); static VType toVTypeChecked(Object javaObject); static VType toVTypeChecked(Object javaObject, Alarm alarm, Time time, Display display);  }