ahc.collection.access
Class TransparentAccessStrategy
java.lang.Object
|
+--ahc.collection.access.TransparentAccessStrategy
- All Implemented Interfaces:
- AccessStrategy
- public class TransparentAccessStrategy
- extends java.lang.Object
- implements AccessStrategy
- Author:
- Arno Haase
Method Summary |
boolean |
add(Store store,
Iterator iter,
java.lang.Object o)
This methods serves to enable optimizations: a collection can obtain a single RawIterator
from its store and then use the access strategy to add multiple elements at this position. |
boolean |
add(Store store,
java.lang.Object o)
|
Iterator |
after(Store store)
|
boolean |
append(Store store,
java.lang.Object o)
|
Iterator |
before(Store store)
|
Iterator |
begin(Store store)
|
Iterator |
end(Store store)
|
Iterator |
first(Store store,
java.lang.Object o)
|
java.lang.Object |
get(Store store,
int index)
|
Iterator |
iter(Store store,
int index)
|
Iterator |
last(Store store,
java.lang.Object o)
|
boolean |
prepend(Store store,
java.lang.Object o)
|
boolean |
remove(Store store,
java.lang.Object o)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final TransparentAccessStrategy INSTANCE
TransparentAccessStrategy
protected TransparentAccessStrategy()
add
public boolean add(Store store,
java.lang.Object o)
- Specified by:
add
in interface AccessStrategy
remove
public boolean remove(Store store,
java.lang.Object o)
- Specified by:
remove
in interface AccessStrategy
add
public boolean add(Store store,
Iterator iter,
java.lang.Object o)
- Description copied from interface:
AccessStrategy
- This methods serves to enable optimizations: a collection can obtain a single RawIterator
from its store and then use the access strategy to add multiple elements at this position.
- Specified by:
add
in interface AccessStrategy
- Parameters:
iter
- must be an iterator on the underlying store
prepend
public boolean prepend(Store store,
java.lang.Object o)
- Specified by:
prepend
in interface AccessStrategy
append
public boolean append(Store store,
java.lang.Object o)
- Specified by:
append
in interface AccessStrategy
get
public java.lang.Object get(Store store,
int index)
- Specified by:
get
in interface AccessStrategy
before
public Iterator before(Store store)
- Specified by:
before
in interface AccessStrategy
begin
public Iterator begin(Store store)
- Specified by:
begin
in interface AccessStrategy
end
public Iterator end(Store store)
- Specified by:
end
in interface AccessStrategy
after
public Iterator after(Store store)
- Specified by:
after
in interface AccessStrategy
iter
public Iterator iter(Store store,
int index)
- Specified by:
iter
in interface AccessStrategy
first
public Iterator first(Store store,
java.lang.Object o)
- Specified by:
first
in interface AccessStrategy
last
public Iterator last(Store store,
java.lang.Object o)
- Specified by:
last
in interface AccessStrategy