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.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.9.2.3 2003/03/21 17:52:03 michiel Exp $
Author:
Pierre van Rooden
See Also:
Serialized Form

Inner Class Summary
 class BasicList.BasicIterator
           
 
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
 

Method Detail

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
Following copied from interface: org.mmbase.bridge.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
Following copied from interface: org.mmbase.bridge.BridgeList
Parameters:
key - the key of the property
the - property value

convert

protected java.lang.Object convert(java.lang.Object o,
                                   int index)

validate

protected java.lang.Object validate(java.lang.Object o)
                             throws java.lang.ClassCastException

get

public java.lang.Object get(int index)
Specified by:
get in interface java.util.List
Overrides:
get in class java.util.ArrayList

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
Following copied from interface: org.mmbase.bridge.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
Overrides:
set in class java.util.ArrayList

add

public void add(int index,
                java.lang.Object o)
Specified by:
add in interface java.util.List
Overrides:
add in class java.util.ArrayList

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.List
Overrides:
add in class java.util.ArrayList

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.List
Overrides:
contains in class java.util.ArrayList

convertAll

protected void convertAll()
Since:
MMBase-1.6.2

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.List
Overrides:
toArray in class java.util.ArrayList


MMBase build 1.6.5.20030923