net.sf.jplist.core
Interface IElement<E>

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

public interface IElement<E>

Interface that all JPList types must implement.

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

Method Summary
 void addContent(E obj)
          Adds some content to the element.
 java.util.List<E> getContent()
          Returns the content of this IElement object.
 Type getType()
          Returns a Type enumeration element signifying the type of this IElement object.
 void setContent(java.util.List<E> obj)
          Adds all of the content to the element.
 int typeOf()
          Returns the type of the IElement object as an int.
 

Method Detail

getContent

java.util.List<E> getContent()
Returns the content of this IElement object.

Returns:
the content.

addContent

void addContent(E obj)
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.

setContent

void setContent(java.util.List<E> obj)
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.

typeOf

int typeOf()
Returns the type of the IElement object as an int. #deprecated Retained for backward compatibility with Java 1.4 client code. Java 1.5 code should use the getType()::Type method instead.

Returns:
the type of the IElement object as an int.

getType

Type getType()
Returns a Type enumeration element signifying the type of this IElement object.

Returns:
the Type of the IElement.