de.fh_mannheim.mm.dms.framework
Class CategoryList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended byde.fh_mannheim.mm.dms.framework.CategoryList
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, IElement, java.util.List, java.util.RandomAccess, java.io.Serializable

public class CategoryList
extends java.util.ArrayList
implements IElement

This class gives a representation of the categories of a specific user.

Version:
$Revision: 1.8 $
Author:
Jan Löffler, mail@jlsoft.de
See Also:
Serialized Form

Constructor Summary
CategoryList()
          Constructor.
CategoryList(java.util.ArrayList aList)
          Constructor.
CategoryList(int nSize)
          Constructor.
 
Method Summary
 void addCategory(Category category)
          Add a category to list.
 void addCategoryList(java.util.ArrayList aList)
          Add a category to list.
 boolean containsCategory(int nCategoryID)
          Searches a given category in list.
 void deleteCategory(int nCategoryID)
          Delete a category from list.
 void deleteCategory(java.lang.String strCategory)
          Delete a category from list.
 Category getCategory(int nIndex)
          Get category from list.
 org.w3c.dom.Element toElement(org.w3c.dom.Document doc)
          Write information of category in a xml element.
 org.w3c.dom.Element toElement(org.w3c.dom.Element element, org.w3c.dom.Document doc)
          Write information of category in a xml element.
 java.lang.String toString()
          Write information of category in a string.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Constructor Detail

CategoryList

public CategoryList()
Constructor.


CategoryList

public CategoryList(int nSize)
Constructor.

Parameters:
nSize - Size of array

CategoryList

public CategoryList(java.util.ArrayList aList)
Constructor.

Parameters:
aList - Pre-selected list
Method Detail

addCategory

public void addCategory(Category category)
Add a category to list.

Parameters:
category - Category

addCategoryList

public void addCategoryList(java.util.ArrayList aList)
Add a category to list.

Parameters:
aList - List with categories

containsCategory

public boolean containsCategory(int nCategoryID)
Searches a given category in list.

Parameters:
nCategoryID - Category
Returns:
true, if existent

getCategory

public Category getCategory(int nIndex)
Get category from list.

Parameters:
nIndex - Index of list
Returns:
Category

deleteCategory

public void deleteCategory(int nCategoryID)
Delete a category from list.

Parameters:
nCategoryID - Category

deleteCategory

public void deleteCategory(java.lang.String strCategory)
Delete a category from list.

Parameters:
strCategory - Category

toElement

public org.w3c.dom.Element toElement(org.w3c.dom.Document doc)
Write information of category in a xml element.

Specified by:
toElement in interface IElement
Parameters:
doc - XML Document
Returns:
element

toElement

public org.w3c.dom.Element toElement(org.w3c.dom.Element element,
                                     org.w3c.dom.Document doc)
Write information of category in a xml element.

Specified by:
toElement in interface IElement
Parameters:
element - Root element
doc - XML Document
Returns:
element

toString

public java.lang.String toString()
Write information of category in a string.

Specified by:
toString in interface IElement
Returns:
information