net.sf.jplist.core
Class DataElement

java.lang.Object
  extended by net.sf.jplist.core.DataElement
All Implemented Interfaces:
IElement

public class DataElement
extends java.lang.Object
implements IElement

Implement the DataElement. The DataElement is a scalar type, it is usually used to store byte arrays in String form. The implementation is identical to StringElement, this is something of syntactic sugar for PLists.

Version:
$Revision: 1.2 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Field Summary
 
Fields inherited from interface net.sf.jplist.core.IElement
ARRAY, DATA, DICTIONARY, DOCUMENT, STRING
 
Constructor Summary
DataElement()
          Instantiate a DataElement object.
 
Method Summary
 void addContent(java.lang.Object obj)
          Adds content to the DataElement.
 java.lang.Object getContent()
          Return the Content of the DataElement.
 void setContent(java.lang.Object obj)
          Sets content in the DataElement.
 int typeOf()
          Returns the type of IElement object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataElement

public DataElement()
Instantiate a DataElement object.

Method Detail

getContent

public java.lang.Object getContent()
Return the Content of the DataElement.

Specified by:
getContent in interface IElement
Returns:
the content.
See Also:
IElement.getContent()

addContent

public void addContent(java.lang.Object obj)
                throws JPListException
Adds content to the DataElement.

Specified by:
addContent in interface IElement
Parameters:
obj - the Object which represents the content.
Throws:
JPListException - if there was a problem with adding content.
See Also:
IElement.addContent(java.lang.Object)

setContent

public void setContent(java.lang.Object obj)
                throws JPListException
Sets content in the DataElement. Same as addContent in a scalar context.

Specified by:
setContent in interface IElement
Parameters:
obj - the Object to set.
Throws:
JPListException - if there was a problem with setting content.
See Also:
IElement.setContent(java.lang.Object)

typeOf

public int typeOf()
Returns the type of IElement object.

Specified by:
typeOf in interface IElement
Returns:
the type of IElement object.
See Also:
IElement.typeOf()