Interface IMetaData

  • All Known Implementing Classes:
    Sample

    public interface IMetaData
    Store additional data and information associated with an object.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Object getData()
      Get meta data stored with the object.
      java.lang.Object getData​(java.lang.String key)
      Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
      java.util.Map<java.lang.String,​java.lang.Object> getDataCollection()
      Get the available meta data entries as a immutable #Map.
      void setData​(java.lang.Object data)
      Store meta data with the object.
      void setData​(java.lang.String key, java.lang.Object data)
      Store meta data mapped with the key.
    • Method Detail

      • getData

        java.lang.Object getData()
        Get meta data stored with the object.
        Returns:
        containing meta data or null
      • setData

        void setData​(java.lang.Object data)
        Store meta data with the object.
        Parameters:
        data - data to be stored with the object
      • getData

        java.lang.Object getData​(java.lang.String key)
        Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
        Parameters:
        key - key associated with the data
        Returns:
        associated meta data or null
        Throws:
        java.lang.IllegalArgumentException -
        • if the key is null
      • setData

        void setData​(java.lang.String key,
                     java.lang.Object data)
        Store meta data mapped with the key. To remove an existing entry, set the data to null.
        Parameters:
        key - key to be associated with the data or null to remove
        data - data to be stored with the object
        Throws:
        java.lang.IllegalArgumentException -
        • if the key is null
      • getDataCollection

        java.util.Map<java.lang.String,​java.lang.Object> getDataCollection()
        Get the available meta data entries as a immutable #Map.
        Returns:
        immutable map of the stored data