Class 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
    • 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 interface QualifiedValue
      • setValue

        public void setValue​(@Nullable
                             java.lang.Object value)
      • 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.
      • 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 class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object val,
                              boolean includeTimestamp)
        Specified by:
        equals in interface QualifiedValue
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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)