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 BasicQualifiedValue
clone()
boolean
equals(java.lang.Object arg0)
Tests that the objects values are equal.boolean
equals(java.lang.Object val, boolean includeTimestamp)
static QualifiedValue
fromObject(java.lang.Object obj)
Creates a QualifiedValue "intelligently" from an object.QualityCode
getQuality()
java.util.Date
getTimestamp()
java.lang.Object
getValue()
void
setQuality(QualityCode code)
void
setQuality(DataQuality code)
Deprecated.here for serialization compatibility.void
setTimestamp(java.util.Date timestamp)
void
setValue(java.lang.Object value)
java.lang.String
toString()
static java.lang.Object
unwrap(java.lang.Object object)
static QualifiedValue
updateTimestamp(QualifiedValue copy)
Creates a copy of the value, but with a current-time timestamp.static java.lang.Object
valueOf(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, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.common.model.values.QualifiedValue
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:
getValue
in interfaceQualifiedValue
-
setValue
public void setValue(@Nullable java.lang.Object value)
-
getQuality
public QualityCode getQuality()
- Specified by:
getQuality
in 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:
getTimestamp
in 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:
equals
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object val, boolean includeTimestamp)
- Specified by:
equals
in interfaceQualifiedValue
-
clone
public BasicQualifiedValue clone()
- Overrides:
clone
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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)
-
-