Joda System API

org.joda.property.impl
Class AbstractBeanList

java.lang.Object
  |
  +--org.joda.property.impl.AbstractBeanList
All Implemented Interfaces:
BeanList, java.util.Collection, java.util.List, java.io.Serializable

public class AbstractBeanList
extends java.lang.Object
implements BeanList

AbstractBeanList should be extended by classes in the application domain model which provide typecast lists. This is used to work around the lack of generic types in Java.

Generally the only method in the subclass is one which typecasts the indexed get method. Thus PersonList will have a getPerson(int index) method that returns a Person.

Author:
Stephen Colebourne
See Also:
Serialized Form

Constructor Summary
AbstractBeanList()
          Constructor that creates a new standalone list.
AbstractBeanList(java.util.List beanList)
          Constructor that wraps the passed in list.
 
Method Summary
 void add(int index, java.lang.Object obj)
           
 boolean add(java.lang.Object obj)
           
 boolean addAll(java.util.Collection coll)
           
 boolean addAll(int index, java.util.Collection coll)
           
 void clear()
           
 boolean contains(java.lang.Object obj)
           
 boolean containsAll(java.util.Collection coll)
           
 java.lang.Object get(int index)
           
 int indexOf(java.lang.Object obj)
           
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 int lastIndexOf(java.lang.Object obj)
           
 java.util.ListIterator listIterator()
           
 java.util.ListIterator listIterator(int index)
           
 java.lang.Object remove(int index)
           
 boolean remove(java.lang.Object obj)
           
 boolean removeAll(java.util.Collection coll)
           
 boolean retainAll(java.util.Collection coll)
           
 java.lang.Object set(int index, java.lang.Object obj)
           
 int size()
           
 java.util.List subList(int fromIndex, int toIndex)
           
 java.lang.Object[] toArray()
           
 java.lang.Object[] toArray(java.lang.Object[] type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

AbstractBeanList

public AbstractBeanList()
Constructor that creates a new standalone list.


AbstractBeanList

public AbstractBeanList(java.util.List beanList)
Constructor that wraps the passed in list.

Method Detail

add

public void add(int index,
                java.lang.Object obj)
Specified by:
add in interface java.util.List
See Also:
List.add(int, Object)

add

public boolean add(java.lang.Object obj)
Specified by:
add in interface java.util.List
See Also:
Collection.add(Object)

addAll

public boolean addAll(java.util.Collection coll)
Specified by:
addAll in interface java.util.List
See Also:
Collection.addAll(Collection)

addAll

public boolean addAll(int index,
                      java.util.Collection coll)
Specified by:
addAll in interface java.util.List
See Also:
List.addAll(int, Collection)

clear

public void clear()
Specified by:
clear in interface java.util.List
See Also:
Collection.clear()

contains

public boolean contains(java.lang.Object obj)
Specified by:
contains in interface java.util.List
See Also:
Collection.contains(Object)

containsAll

public boolean containsAll(java.util.Collection coll)
Specified by:
containsAll in interface java.util.List
See Also:
Collection.containsAll(Collection)

get

public java.lang.Object get(int index)
Specified by:
get in interface java.util.List
See Also:
List.get(int)

indexOf

public int indexOf(java.lang.Object obj)
Specified by:
indexOf in interface java.util.List
See Also:
List.indexOf(Object)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.List
See Also:
Collection.isEmpty()

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.util.List
See Also:
Collection.iterator()

lastIndexOf

public int lastIndexOf(java.lang.Object obj)
Specified by:
lastIndexOf in interface java.util.List
See Also:
List.lastIndexOf(Object)

listIterator

public java.util.ListIterator listIterator()
Specified by:
listIterator in interface java.util.List
See Also:
List.listIterator()

listIterator

public java.util.ListIterator listIterator(int index)
Specified by:
listIterator in interface java.util.List
See Also:
List.listIterator(int)

remove

public java.lang.Object remove(int index)
Specified by:
remove in interface java.util.List
See Also:
List.remove(int)

remove

public boolean remove(java.lang.Object obj)
Specified by:
remove in interface java.util.List
See Also:
Collection.remove(Object)

removeAll

public boolean removeAll(java.util.Collection coll)
Specified by:
removeAll in interface java.util.List
See Also:
Collection.removeAll(Collection)

retainAll

public boolean retainAll(java.util.Collection coll)
Specified by:
retainAll in interface java.util.List
See Also:
Collection.retainAll(Collection)

set

public java.lang.Object set(int index,
                            java.lang.Object obj)
Specified by:
set in interface java.util.List
See Also:
List.set(int, Object)

size

public int size()
Specified by:
size in interface java.util.List
See Also:
Collection.size()

subList

public java.util.List subList(int fromIndex,
                              int toIndex)
Specified by:
subList in interface java.util.List
See Also:
List.subList(int, int)

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.List
See Also:
Collection.toArray()

toArray

public java.lang.Object[] toArray(java.lang.Object[] type)
Specified by:
toArray in interface java.util.List
See Also:
Collection.toArray(Object[])

Joda System API

Copyright © 2001-2003 Stephen Colebourne. All Rights Reserved.