Class MetaData<T>

java.lang.Object
se.conciliate.extensions.documents.MetaData<T>
Direct Known Subclasses:
MetaData.BooleanValue, MetaData.DateTimeValue, MetaData.HiddenValue, MetaData.HtmlValue, MetaData.ImageValue, MetaData.MTSymbolValue, MetaData.NumberValue, MetaData.OptionsValue, MetaData.TextValue, MetaData.UrlValue

public abstract class MetaData<T> extends Object
Meta-data value connected to a single document. All meta-data are immutable. There are only a fixed number of meta data implementations. These are:
  • Method Details

    • getType

      public abstract MetaDataType<? extends MetaData<T>> getType()
      Returns:
      the type of the data.
    • getData

      public T getData()
      Returns:
      The non-null data.
    • isNull

      public boolean isNull()
      Returns true if this is a null value.
      Returns:
      true if this is a null value.
    • setData

      public abstract MetaData<T> setData(T data)
      Parameters:
      data - A new value.
      Returns:
      A copy of this meta-data with the given value as the meta-data's data.
    • stringPresentation

      public String stringPresentation()
      Returns a string representation of the data. This will be shown for example in document lists.
      Returns:
      a string representation of the data.
    • hashCode

      public int hashCode()
      Returns the hash for this meta data. The hash is based on the hash of the data's meta data type and the hash of the data itself.
      Overrides:
      hashCode in class Object
      Returns:
      the hash for this meta data.
    • equals

      public boolean equals(Object obj)
      Checks this meta data's equality relation to some other object. Will return false for any object that is not a meta data instance. Meta data is considered equal if their meta data type and data are equal.
      Overrides:
      equals in class Object
      Parameters:
      obj - The object to check equality for.
      Returns:
      true if obj is a meta data instance and has a meta data type and data that are equal to this meta data, false otherwise.