net.sf.jplist.core
Class ArrayElement

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

public class ArrayElement
extends java.lang.Object
implements IElement

Implements the ArrayElement object. An ArrayElement is a container type for any type that implements IElement.

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
ArrayElement()
          Instantiate an ArrayElement object.
 
Method Summary
 void addContent(java.lang.Object obj)
          Adds a single element to the ArrayElement object.
 java.lang.Object getContent()
          Returns a List containing elements in the ArrayElement object.
 void setContent(java.lang.Object obj)
          Sets the content of the ArrayElement object from a List.
 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

ArrayElement

public ArrayElement()
Instantiate an ArrayElement object.

Method Detail

getContent

public java.lang.Object getContent()
Returns a List containing elements in the ArrayElement object.

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

addContent

public void addContent(java.lang.Object obj)
                throws JPListException
Adds a single element to the ArrayElement object.

Specified by:
addContent in interface IElement
Parameters:
obj - an IElement object to add.
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 the content of the ArrayElement object from a List.

Specified by:
setContent in interface IElement
Parameters:
obj - a List.
Throws:
JPListException - if a wrong type was passed in.
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 this IElement object.
See Also:
IElement.typeOf()