org.mmbase.bridge.implementation
Class BasicList
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
org.mmbase.bridge.implementation.BasicList
- All Implemented Interfaces:
- BridgeList, java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable
- Direct Known Subclasses:
- BasicFieldList, BasicModuleList, BasicNodeList, BasicStringList
- public class BasicList
- extends java.util.ArrayList
- implements BridgeList
A list of objects.
This is the base class for all basic implementations of the bridge lists.
- Version:
- $Id: BasicList.java,v 1.16 2003/12/17 09:16:44 michiel Exp $
- Author:
- Pierre van Rooden
- See Also:
- Serialized Form
| Fields inherited from class java.util.AbstractList |
modCount |
|
Method Summary |
void |
add(int index,
java.lang.Object o)
|
boolean |
add(java.lang.Object o)
|
boolean |
contains(java.lang.Object o)
|
protected java.lang.Object |
convert(java.lang.Object o,
int index)
|
protected void |
convertAll()
|
java.lang.Object |
get(int index)
|
java.lang.Object |
getProperty(java.lang.Object key)
Retrieves a property previously set for this list. |
java.lang.Object |
set(int index,
java.lang.Object o)
|
void |
setProperty(java.lang.Object key,
java.lang.Object value)
Sets a property for this list. |
void |
sort()
Sorts this list according to a default sort order. |
void |
sort(java.util.Comparator comparator)
Sorts this list according to a specified sort order |
java.lang.Object[] |
toArray()
|
protected java.lang.Object |
validate(java.lang.Object o)
|
| Methods inherited from class java.util.ArrayList |
addAll, addAll, clear, clone, ensureCapacity, indexOf, isEmpty, lastIndexOf, remove, removeRange, size, 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, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
addAll, addAll, clear, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, size, subList, toArray |
getProperty
public java.lang.Object getProperty(java.lang.Object key)
- Description copied from interface:
BridgeList
- Retrieves a property previously set for this list.
Use this to store and retrieve metadata on whow teh listw as created
(such as what sort-order was specified)
- Specified by:
getProperty in interface BridgeList
- Parameters:
key - the key of the property
- Returns:
- the property value
setProperty
public void setProperty(java.lang.Object key,
java.lang.Object value)
- Description copied from interface:
BridgeList
- Sets a property for this list.
Use this to store and retrieve metadata on whow teh listw as created
(such as what sort-order was specified)
- Specified by:
setProperty in interface BridgeList
- Parameters:
key - the key of the property
convert
protected java.lang.Object convert(java.lang.Object o,
int index)
contains
public boolean contains(java.lang.Object o)
- Specified by:
contains in interface java.util.List
validate
protected java.lang.Object validate(java.lang.Object o)
throws java.lang.ClassCastException
- Throws:
java.lang.ClassCastException
get
public java.lang.Object get(int index)
- Specified by:
get in interface java.util.List
sort
public void sort()
- Description copied from interface:
BridgeList
- Sorts this list according to a default sort order.
- Specified by:
sort in interface BridgeList
sort
public void sort(java.util.Comparator comparator)
- Description copied from interface:
BridgeList
- Sorts this list according to a specified sort order
- Specified by:
sort in interface BridgeList
- Parameters:
comparator - the comparator defining the sort order
set
public java.lang.Object set(int index,
java.lang.Object o)
- Specified by:
set in interface java.util.List
add
public void add(int index,
java.lang.Object o)
- Specified by:
add in interface java.util.List
add
public boolean add(java.lang.Object o)
- Specified by:
add in interface java.util.List
convertAll
protected void convertAll()
- Since:
- MMBase-1.6.2
toArray
public java.lang.Object[] toArray()
- Specified by:
toArray in interface java.util.List
MMBase build 1.7.1.20041002