org.mmbase.bridge.implementation
Class BasicList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended byorg.mmbase.bridge.implementation.BasicList
All Implemented Interfaces:
BridgeList, Cloneable, Collection, List, RandomAccess, Serializable
Direct Known Subclasses:
BasicFieldList, BasicModuleList, BasicNodeList, BasicStringList

public class BasicList
extends 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.18 2005/12/29 19:23:54 michiel Exp $
Author:
Pierre van Rooden
See Also:
Serialized Form

Nested Class Summary
protected  class BasicList.BasicIterator
           
 
Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
protected BasicList(Collection c)
           
 
Method Summary
 void add(int index, Object o)
           
 boolean add(Object o)
           
 boolean contains(Object o)
           
protected  Object convert(Object o, int index)
           
protected  void convertAll()
           
 Object get(int index)
           
 Object getProperty(Object key)
          Retrieves a property previously set for this list.
 boolean remove(Object o)
           
 boolean removeAll(Collection c)
           
 Object set(int index, Object o)
           
 void setProperty(Object key, Object value)
          Sets a property for this list.
 void sort()
          Sorts this list according to a default sort order.
 void sort(Comparator comparator)
          Sorts this list according to a specified sort order
 Object[] toArray()
           
protected  Object validate(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, 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, retainAll, size, subList, toArray
 

Constructor Detail

BasicList

protected BasicList(Collection c)
Method Detail

getProperty

public Object getProperty(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(Object key,
                        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
value - the property value

convert

protected Object convert(Object o,
                         int index)

contains

public boolean contains(Object o)
Specified by:
contains in interface List

remove

public boolean remove(Object o)
Specified by:
remove in interface List

removeAll

public boolean removeAll(Collection c)
Specified by:
removeAll in interface List

validate

protected Object validate(Object o)
                   throws ClassCastException
Throws:
ClassCastException

get

public Object get(int index)
Specified by:
get in interface 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(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 Object set(int index,
                  Object o)
Specified by:
set in interface List

add

public void add(int index,
                Object o)
Specified by:
add in interface List

add

public boolean add(Object o)
Specified by:
add in interface List

convertAll

protected void convertAll()
Since:
MMBase-1.6.2

toArray

public Object[] toArray()
Specified by:
toArray in interface List


MMBase build 1.8.1.20060716