db4o 7.4

com.db4o.collections
Class ArrayList4<E>

java.lang.Object
  extended by com.db4o.collections.AbstractList4<E>
      extended by 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 com.db4o.collections.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

Constructor Summary
ArrayList4()
          Same behavior as java.util.ArrayList
ArrayList4(java.util.Collection<? extends E> c)
          Same behaviour as java.util.ArrayList
ArrayList4(int initialCapacity)
          Same behaviour as java.util.ArrayList
 
Method Summary
 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(java.util.Collection<? extends E> c)
          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.
 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.
 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
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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 interface Activatable
Parameters:
purpose - TODO
See Also:
Activatable

bind

public void bind(Activator activator)
bind basic implementation.

Specified by:
bind in interface Activatable
Parameters:
activator - the Activator
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 interface java.util.List<E>
Overrides:
add in class com.db4o.collections.AbstractList4<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 interface java.util.Collection<E>
Specified by:
addAll in interface java.util.List<E>
Overrides:
addAll in class com.db4o.collections.AbstractList4<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 interface java.util.List<E>
Overrides:
addAll in class com.db4o.collections.AbstractList4<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 interface java.util.Collection<E>
Specified by:
clear in interface java.util.List<E>
Overrides:
clear in class com.db4o.collections.AbstractList4<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 class java.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 interface java.util.List<E>
Specified by:
get in class com.db4o.collections.AbstractList4<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 interface java.util.List<E>
Overrides:
indexOf in class com.db4o.collections.AbstractList4<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 interface java.util.List<E>
Overrides:
lastIndexOf in class com.db4o.collections.AbstractList4<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 interface java.util.List<E>
Overrides:
remove in class com.db4o.collections.AbstractList4<E>
See Also:
ArrayList, Activatable

set

public E set(int index,
             E element)
same as java.util.ArrayList but transparently activates the members as required.

Specified by:
set in interface java.util.List<E>
Overrides:
set in class com.db4o.collections.AbstractList4<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 interface java.util.Collection<E>
Specified by:
size in interface java.util.List<E>
Specified by:
size in class com.db4o.collections.AbstractList4<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 interface java.util.Collection<E>
Specified by:
toArray in interface java.util.List<E>
Overrides:
toArray in class com.db4o.collections.AbstractList4<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 interface java.util.Collection<E>
Specified by:
toArray in interface java.util.List<E>
Overrides:
toArray in class com.db4o.collections.AbstractList4<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

db4o 7.4

Copyright 2007 db4objects Inc. All rights reserved.