|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ozoneDB.OzoneObject
org.ozoneDB.collections.AbstractOzoneCollection
org.ozoneDB.collections.BaseListImpl
org.ozoneDB.collections._BaseList_SubListImpl
This class follows the implementation requirements set forth in
AbstractList.subList(int, int)
. It matches Sun's implementation
by using a non-public top-level class in the same package.
Field Summary |
Fields inherited from class org.ozoneDB.collections.BaseListImpl |
modCount |
Constructor Summary | |
_BaseList_SubListImpl(BaseList backingList,
int fromIndex,
int toIndex)
Construct the sublist. |
Method Summary | |
void |
_org_ozoneDB_checkBoundsExclusive(int index)
This method checks that a value is between 0 (inclusive) and size (exclusive). |
void |
_org_ozoneDB_checkBoundsInclusive(int index)
This method checks that a value is between 0 and size (inclusive). |
void |
_org_ozoneDB_checkMod()
This method checks the two modCount fields to ensure that there has not been a concurrent modification, returning if all is okay. |
java.util.List |
_org_ozoneDB_emptyClientCollection()
Needed for sub lists so that they can return the same type of list as the sub lists backing list would when getClientXxx() is
called. |
int |
_org_ozoneDB_getModCount()
|
int |
_org_ozoneDB_getOffset()
Returns the offset of this sublist relative to the backing list. |
void |
_org_ozoneDB_incSize(int amount)
Called by an iterator when it removes an item from this sublist or inserts an item. |
java.util.Iterator |
_org_ozoneDB_internalIterator()
|
void |
_org_ozoneDB_removeRange(int fromIndex,
int toIndex)
Specified by AbstractList.subList to delegate to the backing list. |
void |
_org_ozoneDB_syncModCountWithBackingList()
|
void |
add(int index,
java.lang.Object o)
Specified by AbstractList.subList to delegate to the backing list. |
boolean |
addAll(java.util.Collection c)
Specified by AbstractList.subList to return addAll(size, c). |
boolean |
addAll(int index,
java.util.Collection c)
Specified by AbstractList.subList to delegate to the backing list. |
java.lang.Object |
get(int index)
Specified by AbstractList.subList to delegate to the backing list. |
java.util.List |
getClientList()
Returns a List that contains the same entries as this
persistent one; it is (by nature of the client-server enviromnent) always
a 'deep' copy of this OzoneList . |
java.util.Iterator |
iterator()
Specified by AbstractList.subList to return listIterator(). |
java.util.ListIterator |
listIterator(int index)
Specified by AbstractList.subList to return a wrapper around the backing list's iterator. |
java.lang.Object |
remove(int index)
Specified by AbstractList.subList to delegate to the backing list. |
java.lang.Object |
set(int index,
java.lang.Object o)
Specified by AbstractList.subList to delegate to the backing list. |
int |
size()
Specified by AbstractList.subList to return the private field size. |
Methods inherited from class org.ozoneDB.collections.BaseListImpl |
add, clear, equals, hashCode, indexOf, internalIterator, lastIndexOf, listIterator, subList |
Methods inherited from class org.ozoneDB.collections.AbstractOzoneCollection |
contains, containsAll, getClientCollection, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class org.ozoneDB.OzoneObject |
container, database, deleteRecursive, getHandle, getObjectID, handle, onActivate, onCreate, onDelete, onPassivate, requireWriteLocking, self, setContainer, toXML |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.ozoneDB.collections.OzoneCollection |
add, clear, getClientCollection, remove, removeAll, retainAll |
Methods inherited from interface java.util.Collection |
contains, containsAll, equals, hashCode, isEmpty, toArray, toArray |
Methods inherited from interface org.ozoneDB.OzoneCompatibleOrProxy |
getObjectID |
Methods inherited from interface java.util.List |
add, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, remove, removeAll, retainAll, subList, toArray, toArray |
Constructor Detail |
public _BaseList_SubListImpl(BaseList backingList, int fromIndex, int toIndex)
backingList
- the list this comes fromfromIndex
- the lower bound, inclusivetoIndex
- the upper bound, exclusiveMethod Detail |
public void _org_ozoneDB_checkMod()
_org_ozoneDB_checkMod
in interface _BaseList_SubList
java.util.ConcurrentModificationException
- if the backing list has been
modified externally to this sublistpublic void _org_ozoneDB_checkBoundsInclusive(int index)
_org_ozoneDB_checkBoundsInclusive
in interface _BaseList_SubList
index
- the value to check
java.lang.IndexOutOfBoundsException
- if the value is out of rangepublic void _org_ozoneDB_checkBoundsExclusive(int index)
_org_ozoneDB_checkBoundsExclusive
in interface _BaseList_SubList
index
- the value to check
java.lang.IndexOutOfBoundsException
- if the value is out of rangepublic int size()
size
in interface java.util.Collection
size
in class AbstractOzoneCollection
public java.lang.Object set(int index, java.lang.Object o)
set
in interface OzoneList
set
in class BaseListImpl
index
- the location to modifyo
- the new value
public java.lang.Object get(int index)
get
in interface java.util.List
index
- the location to get from
public void add(int index, java.lang.Object o)
add
in interface OzoneList
add
in class BaseListImpl
index
- the index to insert ato
- the object to addpublic java.lang.Object remove(int index)
remove
in interface OzoneList
remove
in class BaseListImpl
index
- the index to remove
BaseListImpl.modCount
public void _org_ozoneDB_removeRange(int fromIndex, int toIndex)
_org_ozoneDB_removeRange
in interface BaseList
_org_ozoneDB_removeRange
in class BaseListImpl
fromIndex
- the lower bound, inclusivetoIndex
- the upper bound, exclusivepublic boolean addAll(int index, java.util.Collection c)
addAll
in interface OzoneList
addAll
in class BaseListImpl
index
- the location to insert atc
- the collection to insert
public boolean addAll(java.util.Collection c)
addAll
in interface OzoneCollection
addAll
in class AbstractOzoneCollection
c
- the collection to insert
AbstractOzoneCollection.add(Object)
public java.util.Iterator _org_ozoneDB_internalIterator()
_org_ozoneDB_internalIterator
in interface OzoneCollection
public java.util.Iterator iterator()
iterator
in interface java.util.Collection
iterator
in class BaseListImpl
BaseListImpl.modCount
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
listIterator
in class BaseListImpl
index
- the start location of the iterator
BaseListImpl.modCount
public int _org_ozoneDB_getModCount()
_org_ozoneDB_getModCount
in interface BaseList
public void _org_ozoneDB_incSize(int amount)
_BaseList_SubList
_org_ozoneDB_incSize
in interface _BaseList_SubList
public java.util.List getClientList()
OzoneList
Returns a List
that contains the same entries as this
persistent one; it is (by nature of the client-server enviromnent) always
a 'deep' copy of this OzoneList
. I.e. the contents of
this OzoneList
instance are always copied to the client
by use of serialization.
Note that the difference of calling iterator()
compared to getClientList().iterator()
is that in
the first case you go through the real collection on the server and in
the second case you go through a local copy on the client side.
getClientList
in interface OzoneList
getClientList
in class BaseListImpl
public int _org_ozoneDB_getOffset()
_BaseList_SubList
_org_ozoneDB_getOffset
in interface _BaseList_SubList
public java.util.List _org_ozoneDB_emptyClientCollection()
BaseList
getClientXxx()
is
called.
_org_ozoneDB_emptyClientCollection
in interface BaseList
getClientXxx()
public void _org_ozoneDB_syncModCountWithBackingList()
_org_ozoneDB_syncModCountWithBackingList
in interface _BaseList_SubList
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |