Class BasicQualifiedValue
- java.lang.Object
-
- com.inductiveautomation.ignition.common.model.values.BasicQualifiedValue
-
- All Implemented Interfaces:
QualifiedValue,java.io.Serializable
- Direct Known Subclasses:
BasicQualifiedValue
public class BasicQualifiedValue extends java.lang.Object implements QualifiedValue, java.io.Serializable
The basic implementation of QualifiedValue.Changes ----------- 8.0 - Changed from "Quality" to "QualityCode".
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.inductiveautomation.ignition.common.model.values.QualifiedValue
BAD, CONFIG_ERROR, DISABLED, EXPRESSION_EVAL_ERROR, INITIAL_VALUE, NOT_CONNECTED, NOT_FOUND, REFERENCE_NOT_FOUND, STALE, TRANSFORM_ERROR, TYPE_CONVERSION, UNKNOWN, UNSUPPORTED
-
-
Constructor Summary
Constructors Constructor Description BasicQualifiedValue()BasicQualifiedValue(QualifiedValue copy)BasicQualifiedValue(java.lang.Object value)Creates a BasicQualifiedValue with good quality and the current timestampBasicQualifiedValue(java.lang.Object value, QualityCode quality)BasicQualifiedValue(java.lang.Object value, QualityCode quality, java.util.Date timeStamp)BasicQualifiedValue(java.lang.Object value, Quality quality, java.util.Date timeStamp)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BasicQualifiedValueclone()booleanequals(java.lang.Object arg0)Tests that the objects values are equal.booleanequals(java.lang.Object val, boolean includeTimestamp)static QualifiedValuefromObject(java.lang.Object obj)Creates a QualifiedValue "intelligently" from an object.QualityCodegetQuality()java.util.DategetTimestamp()java.lang.ObjectgetValue()inthashCode()voidsetQuality(QualityCode code)voidsetQuality(DataQuality code)Deprecated.here for serialization compatibility.voidsetTimestamp(java.util.Date timestamp)voidsetValue(java.lang.Object value)java.lang.StringtoString()static java.lang.Objectunwrap(java.lang.Object object)static QualifiedValueupdateTimestamp(QualifiedValue copy)Creates a copy of the value, but with a current-time timestamp.static java.lang.ObjectvalueOf(java.lang.Object object)If the object is a QualifiedValue, will return the internal value, otherwise returns the object passed in.-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.common.model.values.QualifiedValue
derive, derive, derive
-
-
-
-
Constructor Detail
-
BasicQualifiedValue
public BasicQualifiedValue()
-
BasicQualifiedValue
public BasicQualifiedValue(@Nullable java.lang.Object value)Creates a BasicQualifiedValue with good quality and the current timestamp
-
BasicQualifiedValue
public BasicQualifiedValue(java.lang.Object value, QualityCode quality)
-
BasicQualifiedValue
@Deprecated public BasicQualifiedValue(java.lang.Object value, Quality quality, java.util.Date timeStamp)Deprecated.Provided for backward compatibility only, do not use in any new code
-
BasicQualifiedValue
public BasicQualifiedValue(java.lang.Object value, QualityCode quality, java.util.Date timeStamp)
-
BasicQualifiedValue
public BasicQualifiedValue(QualifiedValue copy)
-
-
Method Detail
-
getValue
@Nullable public java.lang.Object getValue()
- Specified by:
getValuein interfaceQualifiedValue
-
setValue
public void setValue(@Nullable java.lang.Object value)
-
getQuality
public QualityCode getQuality()
- Specified by:
getQualityin interfaceQualifiedValue
-
setQuality
public void setQuality(QualityCode code)
-
setQuality
@Deprecated public void setQuality(DataQuality code)
Deprecated.here for serialization compatibility.This needs to be here for serialization compatibility.
-
getTimestamp
public java.util.Date getTimestamp()
- Specified by:
getTimestampin interfaceQualifiedValue
-
setTimestamp
public void setTimestamp(java.util.Date timestamp)
-
equals
public boolean equals(java.lang.Object arg0)
Tests that the objects values are equal. DOES NOT TEST timestamp, because in most cases you want to leave it out. If you want to test it, call equals(val,true).- Overrides:
equalsin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object val, boolean includeTimestamp)- Specified by:
equalsin interfaceQualifiedValue
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
clone
public BasicQualifiedValue clone()
- Overrides:
clonein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
fromObject
public static QualifiedValue fromObject(java.lang.Object obj)
Creates a QualifiedValue "intelligently" from an object. If the object is already a QualifiedValue, then it won't "double-wrap" the object. Otherwise it will make a new BasicQualifiedValue with a good quality.
-
updateTimestamp
public static QualifiedValue updateTimestamp(QualifiedValue copy)
Creates a copy of the value, but with a current-time timestamp.
-
valueOf
@Nullable public static java.lang.Object valueOf(@Nullable java.lang.Object object)If the object is a QualifiedValue, will return the internal value, otherwise returns the object passed in.
-
unwrap
public static java.lang.Object unwrap(@Nullable java.lang.Object object)
-
-