com.ashridgetech.prevdb.client
Class RefList
java.lang.Object
|
+--com.ashridgetech.prevdb.client.RefList
- All Implemented Interfaces:
- Collection, List
- public class RefList
- extends Object
- implements List
A reference from one persistent object to a List
of related objects.
Holds only the persistent field of the related class that refers to this class
until it is accessed, when it finds the list by looking it up in the
PersistentManager
of the related type.
The list is unmodifiable.
- Version:
- 1.0
- Author:
- paulb
Constructor Summary |
RefList(Persistent container,
PersistentField referencingField)
Creates new RefList that contains a collection of objects referring to this one. |
RefList
public RefList(Persistent container,
PersistentField referencingField)
- Creates new
RefList
that contains a collection of objects referring to this one.
- Parameters:
container
- the Persistent
object that contains this RefList
referencingField
- the field in the referring class that points to this class
size
public int size()
- Specified by:
size
in interface List
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface List
contains
public boolean contains(Object o)
- Specified by:
contains
in interface List
toArray
public Object[] toArray()
- Specified by:
toArray
in interface List
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArray
in interface List
iterator
public Iterator iterator()
- Specified by:
iterator
in interface List
add
public boolean add(Object o)
- Specified by:
add
in interface List
remove
public boolean remove(Object o)
- Specified by:
remove
in interface List
containsAll
public boolean containsAll(Collection coll)
- Specified by:
containsAll
in interface List
addAll
public boolean addAll(Collection coll)
- Specified by:
addAll
in interface List
removeAll
public boolean removeAll(Collection coll)
- Specified by:
removeAll
in interface List
retainAll
public boolean retainAll(Collection coll)
- Specified by:
retainAll
in interface List
clear
public void clear()
- Specified by:
clear
in interface List
toString
public String toString()
- Overrides:
toString
in class Object
equals
public boolean equals(Object o)
- Specified by:
equals
in interface List
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface List
- Overrides:
hashCode
in class Object
get
public Object get(int index)
- Specified by:
get
in interface List
set
public Object set(int index,
Object element)
- Specified by:
set
in interface List
add
public void add(int index,
Object element)
- Specified by:
add
in interface List
remove
public Object remove(int index)
- Specified by:
remove
in interface List
indexOf
public int indexOf(Object o)
- Specified by:
indexOf
in interface List
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interface List
addAll
public boolean addAll(int index,
Collection c)
- Specified by:
addAll
in interface List
listIterator
public ListIterator listIterator()
- Specified by:
listIterator
in interface List
listIterator
public ListIterator listIterator(int index)
- Specified by:
listIterator
in interface List
subList
public List subList(int fromIndex,
int toIndex)
- Specified by:
subList
in interface List
Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.