Class BasicQualifiedValue

java.lang.Object
com.inductiveautomation.ignition.common.model.values.BasicQualifiedValue
All Implemented Interfaces:
QualifiedValue, Serializable
Direct Known Subclasses:
BasicQualifiedValue

public class BasicQualifiedValue extends Object implements QualifiedValue, Serializable
The basic implementation of QualifiedValue.

Changes ----------- 8.0 - Changed from "Quality" to "QualityCode".

See Also:
  • Constructor Details

    • BasicQualifiedValue

      public BasicQualifiedValue()
    • BasicQualifiedValue

      public BasicQualifiedValue(@Nullable Object value)
      Creates a BasicQualifiedValue with good quality and the current timestamp
    • BasicQualifiedValue

      public BasicQualifiedValue(Object value, QualityCode quality)
    • BasicQualifiedValue

      @Deprecated public BasicQualifiedValue(Object value, Quality quality, Date timeStamp)
      Deprecated.
      Provided for backward compatibility only, do not use in any new code
    • BasicQualifiedValue

      public BasicQualifiedValue(Object value, QualityCode quality, Date timeStamp)
    • BasicQualifiedValue

      public BasicQualifiedValue(QualifiedValue copy)
  • Method Details

    • getValue

      @Nullable public Object getValue()
      Specified by:
      getValue in interface QualifiedValue
    • setValue

      public void setValue(@Nullable Object value)
    • getQuality

      public QualityCode getQuality()
      Specified by:
      getQuality in interface QualifiedValue
    • 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 Date getTimestamp()
      Specified by:
      getTimestamp in interface QualifiedValue
    • setTimestamp

      public void setTimestamp(Date timestamp)
    • equals

      public boolean equals(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 class Object
    • equals

      public boolean equals(Object val, boolean includeTimestamp)
      Specified by:
      equals in interface QualifiedValue
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public BasicQualifiedValue clone()
      Overrides:
      clone in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromObject

      public static QualifiedValue fromObject(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 Object valueOf(@Nullable Object object)
      If the object is a QualifiedValue, will return the internal value, otherwise returns the object passed in.
    • unwrap

      public static Object unwrap(@Nullable Object object)