net.sf.jplist.core
Class Document

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

public class Document
extends java.lang.Object
implements IElement

Implements the Document object for JPList. A Document is an implementation of the IElement interface and represents the top level container for the PList.

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

Field Summary
protected  java.util.List elements
           
 
Fields inherited from interface net.sf.jplist.core.IElement
ARRAY, DATA, DICTIONARY, DOCUMENT, STRING
 
Constructor Summary
Document()
          Instantiate a Document object.
 
Method Summary
 void addContent(java.lang.Object obj)
          Allows addition of a single IElement object.
 java.lang.Object getContent()
          Returns a List object of all elements in the Document.
 void setContent(java.lang.Object obj)
          Sets all the elements into the Document.
 int typeOf()
          Returns the type of the IElement object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elements

protected java.util.List elements
Constructor Detail

Document

public Document()
Instantiate a Document object.

Method Detail

getContent

public java.lang.Object getContent()
Returns a List object of all elements in the Document.

Specified by:
getContent in interface IElement
Returns:
a List.
See Also:
IElement.getContent()

addContent

public void addContent(java.lang.Object obj)
                throws JPListException
Allows addition of a single IElement object.

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

setContent

public void setContent(java.lang.Object obj)
                throws JPListException
Sets all the elements into the Document.

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

typeOf

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

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