Class DataContent

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class DataContent
    extends org.jdom.Content
    A Content that holds a value in it, and when it's getValue method is called will return that value. Used by the JDOM builders for storing values in Elements.
    Jerry Vos
    See Also:
    Serialized Form
    • Constructor Detail

      • DataContent

        public DataContent()
        Creates this without an object to use as data. Before this is used the setData(Object) method should be called
        See Also:
      • DataContent

        public DataContent​(Object data)
        Creates this with the specified object as data.
        data - the object to used in getValue()
        See Also:
    • Method Detail

      • getValue

        public String getValue()
        Retrieves the string value of the data.
        Specified by:
        getValue in class org.jdom.Content
        null if the data is null, otherwise data.toString()
      • getData

        public Object getData()
        Retrieves the data to be used in the getValue() method.
        the data object
      • setData

        public void setData​(Object data)
        Sets the data to be used in the getValue() method.
        data - the data object