Package com.db4o.collections
Class ActivatableArrayList<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<E>
-
- com.db4o.collections.ActivatableArrayList<E>
-
- All Implemented Interfaces:
ActivatableCollection<E>,ActivatableList<E>,Activatable,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<E>,java.util.Collection<E>,java.util.List<E>,java.util.RandomAccess
public class ActivatableArrayList<E> extends java.util.ArrayList<E> implements ActivatableList<E>
extends ArrayList with Transparent Activation and Transparent Persistence support- Since:
- 7.9
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ActivatableArrayList()ActivatableArrayList(int size)ActivatableArrayList(java.util.Collection<E> list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(ActivationPurpose purpose)Should be called by every reading field access of an object.voidadd(int index, E element)booleanadd(E e)booleanaddAll(int index, java.util.Collection<? extends E> c)booleanaddAll(java.util.Collection<? extends E> c)voidbind(Activator activator)Called by db4o after the object instantiation.voidclear()java.lang.Objectclone()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)voidensureCapacity(int minCapacity)booleanequals(java.lang.Object o)Eget(int index)inthashCode()intindexOf(java.lang.Object o)booleanisEmpty()java.util.Iterator<E>iterator()intlastIndexOf(java.lang.Object o)java.util.ListIterator<E>listIterator()java.util.ListIterator<E>listIterator(int index)Eremove(int index)booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)protected voidremoveRange(int fromIndex, int toIndex)booleanretainAll(java.util.Collection<?> c)Eset(int index, E element)intsize()java.util.List<E>subList(int fromIndex, int toIndex)java.lang.Object[]toArray()<T> T[]toArray(T[] a)java.lang.StringtoString()voidtrimToSize()
-
-
-
Constructor Detail
-
ActivatableArrayList
public ActivatableArrayList()
-
ActivatableArrayList
public ActivatableArrayList(int size)
-
ActivatableArrayList
public ActivatableArrayList(java.util.Collection<E> list)
-
-
Method Detail
-
activate
public void activate(ActivationPurpose purpose)
Description copied from interface:ActivatableShould be called by every reading field access of an object.
The recommended implementation of this method is to callActivator.activate(ActivationPurpose)on theActivatorthat was previously passed toActivatable.bind(Activator).- Specified by:
activatein interfaceActivatable- Parameters:
purpose- Whereever this object is accessed to read or write. SeeActivationPurpose
-
bind
public void bind(Activator activator)
Description copied from interface:ActivatableCalled by db4o after the object instantiation. This method is called to bind the object to the current activator
The recommended implementation of this method is to store the passedActivatorin a transient field of the object.- Specified by:
bindin interfaceActivatable- Parameters:
activator- the Activator instance to bind
-
add
public boolean add(E e)
-
add
public void add(int index, E element)
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
-
addAll
public boolean addAll(int index, java.util.Collection<? extends E> c)
-
clear
public void clear()
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.util.ArrayList<E>
-
contains
public boolean contains(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
equals
public boolean equals(java.lang.Object o)
-
get
public E get(int index)
-
hashCode
public int hashCode()
-
indexOf
public int indexOf(java.lang.Object o)
-
iterator
public java.util.Iterator<E> iterator()
-
isEmpty
public boolean isEmpty()
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
-
listIterator
public java.util.ListIterator<E> listIterator()
-
listIterator
public java.util.ListIterator<E> listIterator(int index)
-
remove
public E remove(int index)
-
remove
public boolean remove(java.lang.Object o)
-
size
public int size()
-
subList
public java.util.List<E> subList(int fromIndex, int toIndex)
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
removeRange
protected void removeRange(int fromIndex, int toIndex)- Overrides:
removeRangein classjava.util.ArrayList<E>
-
ensureCapacity
public void ensureCapacity(int minCapacity)
- Overrides:
ensureCapacityin classjava.util.ArrayList<E>
-
trimToSize
public void trimToSize()
- Overrides:
trimToSizein classjava.util.ArrayList<E>
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.util.AbstractCollection<E>
-
-