Package com.db4o.collections
Class ArrayList4<E>
- java.lang.Object
-
- com.db4o.collections.AbstractList4<E>
-
- com.db4o.collections.ArrayList4<E>
-
- All Implemented Interfaces:
Activatable
,java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<E>
,java.util.Collection<E>
,java.util.List<E>
,java.util.RandomAccess
public class ArrayList4<E> extends AbstractList4<E> implements java.lang.Cloneable, java.io.Serializable, java.util.RandomAccess, Activatable
Transparent activatable ArrayList implementation. Implements List interface using an array to store elements. Each ArrayList4 instance has a capacity, which indicates the size of the internal array.
When instantiated as a result of a query, all the internal members are NOT activated at all. When internal members are required to perform an operation, the instance transparently activates all the members.- See Also:
ArrayList
,Activatable
, Serialized Form
-
-
Field Summary
-
Fields inherited from class com.db4o.collections.AbstractList4
modCount
-
-
Constructor Summary
Constructors Constructor Description ArrayList4()
Same behavior as java.util.ArrayListArrayList4(int initialCapacity)
Same behaviour as java.util.ArrayListArrayList4(java.util.Collection<? extends E> c)
Same behaviour as java.util.ArrayList
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(ActivationPurpose purpose)
activate basic implementation.void
add(int index, E element)
same as java.util.ArrayList but transparently activates the members as required.boolean
addAll(int index, java.util.Collection<? extends E> c)
same as java.util.ArrayList but transparently activates the members as required.boolean
addAll(java.util.Collection<? extends E> c)
same as java.util.ArrayList but transparently activates the members as required.void
bind(Activator activator)
bind basic implementation.void
clear()
same as java.util.ArrayList but transparently activates the members as required.java.lang.Object
clone()
same as java.util.ArrayList but transparently activates the members as required.void
ensureCapacity(int minCapacity)
same as java.util.ArrayList but transparently activates the members as required.E
get(int index)
same as java.util.ArrayList but transparently activates the members as required.int
indexOf(java.lang.Object o)
same as java.util.ArrayList but transparently activates the members as required.int
lastIndexOf(java.lang.Object o)
same as java.util.ArrayList but transparently activates the members as required.E
remove(int index)
same as java.util.ArrayList but transparently activates the members as required.protected void
removeRange(int fromIndex, int toIndex)
E
set(int index, E element)
same as java.util.ArrayList but transparently activates the members as required.int
size()
same as java.util.ArrayList but transparently activates the members as required.java.lang.Object[]
toArray()
same as java.util.ArrayList but transparently activates the members as required.<T> T[]
toArray(T[] a)
same as java.util.ArrayList but transparently activates the members as required.void
trimToSize()
same as java.util.ArrayList but transparently activates the members as required.-
Methods inherited from class com.db4o.collections.AbstractList4
add, contains, containsAll, equals, hashCode, isEmpty, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList, toString
-
-
-
-
Constructor Detail
-
ArrayList4
public ArrayList4()
Same behavior as java.util.ArrayList- See Also:
ArrayList
-
ArrayList4
public ArrayList4(java.util.Collection<? extends E> c)
Same behaviour as java.util.ArrayList- See Also:
ArrayList
-
ArrayList4
public ArrayList4(int initialCapacity)
Same behaviour as java.util.ArrayList- See Also:
ArrayList
-
-
Method Detail
-
activate
public void activate(ActivationPurpose purpose)
activate basic implementation.- Specified by:
activate
in interfaceActivatable
- Parameters:
purpose
- Whereever this object is accessed to read or write. SeeActivationPurpose
- See Also:
Activatable
-
bind
public void bind(Activator activator)
bind basic implementation.- Specified by:
bind
in interfaceActivatable
- Parameters:
activator
- the Activator instance to bind- See Also:
Activatable
-
add
public void add(int index, E element)
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
add
in interfacejava.util.List<E>
- Overrides:
add
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
addAll
in interfacejava.util.Collection<E>
- Specified by:
addAll
in interfacejava.util.List<E>
- Overrides:
addAll
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
addAll
public boolean addAll(int index, java.util.Collection<? extends E> c)
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
addAll
in interfacejava.util.List<E>
- Overrides:
addAll
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
clear
public void clear()
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
clear
in interfacejava.util.Collection<E>
- Specified by:
clear
in interfacejava.util.List<E>
- Overrides:
clear
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
clone
public java.lang.Object clone()
same as java.util.ArrayList but transparently activates the members as required.- Overrides:
clone
in classjava.lang.Object
- See Also:
ArrayList
,Activatable
-
ensureCapacity
public void ensureCapacity(int minCapacity)
same as java.util.ArrayList but transparently activates the members as required.- See Also:
ArrayList
,Activatable
-
get
public E get(int index)
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
get
in interfacejava.util.List<E>
- Specified by:
get
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
indexOf
public int indexOf(java.lang.Object o)
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
indexOf
in interfacejava.util.List<E>
- Overrides:
indexOf
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
lastIndexOf
public int lastIndexOf(java.lang.Object o)
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
lastIndexOf
in interfacejava.util.List<E>
- Overrides:
lastIndexOf
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
remove
public E remove(int index)
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
remove
in interfacejava.util.List<E>
- Overrides:
remove
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
removeRange
protected void removeRange(int fromIndex, int toIndex)
- Overrides:
removeRange
in classAbstractList4<E>
-
set
public E set(int index, E element)
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
set
in interfacejava.util.List<E>
- Overrides:
set
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
size
public int size()
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
size
in interfacejava.util.Collection<E>
- Specified by:
size
in interfacejava.util.List<E>
- Specified by:
size
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
toArray
public java.lang.Object[] toArray()
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
toArray
in interfacejava.util.Collection<E>
- Specified by:
toArray
in interfacejava.util.List<E>
- Overrides:
toArray
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
toArray
public <T> T[] toArray(T[] a)
same as java.util.ArrayList but transparently activates the members as required.- Specified by:
toArray
in interfacejava.util.Collection<E>
- Specified by:
toArray
in interfacejava.util.List<E>
- Overrides:
toArray
in classAbstractList4<E>
- See Also:
ArrayList
,Activatable
-
trimToSize
public void trimToSize()
same as java.util.ArrayList but transparently activates the members as required.- See Also:
ArrayList
,Activatable
-
-