net.sf.jplist.core
Interface IElement

All Known Implementing Classes:
ArrayElement, DataElement, DictionaryElement, Document, StringElement

public interface IElement

Interface that all JPList types must implement.

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

Field Summary
static int ARRAY
           
static int DATA
           
static int DICTIONARY
           
static int DOCUMENT
           
static int STRING
           
 
Method Summary
 void addContent(java.lang.Object obj)
          Adds some content to the element.
 java.lang.Object getContent()
          Returns the content of this IElement object.
 void setContent(java.lang.Object obj)
          Adds all of the content to the element.
 int typeOf()
          Returns the type of the IElement object.
 

Field Detail

DOCUMENT

static final int DOCUMENT
See Also:
Constant Field Values

STRING

static final int STRING
See Also:
Constant Field Values

DATA

static final int DATA
See Also:
Constant Field Values

ARRAY

static final int ARRAY
See Also:
Constant Field Values

DICTIONARY

static final int DICTIONARY
See Also:
Constant Field Values
Method Detail

getContent

java.lang.Object getContent()
Returns the content of this IElement object.

Returns:
the content.

addContent

void addContent(java.lang.Object obj)
                throws JPListException
Adds some content to the element. For collection types (ARRAY and DICTIONARY), this operation is additive, that is, multiple addContent() calls will add to the content already existing.

Parameters:
obj - the content to add.
Throws:
JPListException - if there was a problem adding content.

setContent

void setContent(java.lang.Object obj)
                throws JPListException
Adds all of the content to the element. For non-collection types (STRING and DATA), this call is identical to the addContent() call.

Parameters:
obj - the content to set.
Throws:
JPListException - if there was a problem setting content.

typeOf

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

Returns:
the type of the IElement object.