ahc.collection.store
Class DlinkedStore

java.lang.Object
  |
  +--ahc.collection.store.AbstractStore
        |
        +--ahc.collection.store.DlinkedStore
All Implemented Interfaces:
Store

public class DlinkedStore
extends ahc.collection.store.AbstractStore

Author:
Arno Haase

Field Summary
protected  EqualityStrategy _eqStrat
           
 
Constructor Summary
DlinkedStore(EqualityStrategy eqStrat)
           
 
Method Summary
 Iterator after()
           
 void append(java.lang.Object o)
           
 Iterator before()
           
 Iterator begin()
           
 void clear()
           
 void compactSize()
           
 boolean contains(java.lang.Object o)
           
 Iterator end()
           
 Iterator first(java.lang.Object o)
           
 java.lang.Object get(int index)
           
 EqualityStrategy getEqualityStrategy()
           
 boolean isEmpty()
           
 boolean isSorted()
          true means that the store's internal representation is sorted (i.e.
 Iterator iter(int ind)
           
 Iterator last(java.lang.Object o)
           
 void prepend(java.lang.Object o)
           
 boolean preservesOrdering()
          true means that the store retains elements in an order that can be specified from the outside (e.g. array), false otherwise.
 java.lang.Object remove(int index)
           
 boolean remove(java.lang.Object o)
           
 java.lang.Object set(int index, java.lang.Object element)
           
 void setEqualityStrategy(EqualityStrategy eqStrat)
           
 int size()
           
 java.lang.Object[] toArray()
           
 java.lang.Object[] toArray(java.lang.Object[] dest)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_eqStrat

protected EqualityStrategy _eqStrat
Constructor Detail

DlinkedStore

public DlinkedStore(EqualityStrategy eqStrat)
Method Detail

preservesOrdering

public boolean preservesOrdering()
Description copied from interface: Store
true means that the store retains elements in an order that can be specified from the outside (e.g. array), false otherwise.


isSorted

public boolean isSorted()
Description copied from interface: Store
true means that the store's internal representation is sorted (i.e. relative to a Comparator), false otherwise. This is similar to the issue of order preservation but not the same: e.g. a hash-based store does not preserve ordering but is not sorted.


prepend

public void prepend(java.lang.Object o)

append

public void append(java.lang.Object o)

get

public java.lang.Object get(int index)
Specified by:
get in interface Store
Overrides:
get in class ahc.collection.store.AbstractStore

size

public int size()

clear

public void clear()

iter

public Iterator iter(int ind)

before

public Iterator before()

begin

public Iterator begin()

end

public Iterator end()

after

public Iterator after()

compactSize

public void compactSize()

getEqualityStrategy

public EqualityStrategy getEqualityStrategy()
Specified by:
getEqualityStrategy in interface Store

setEqualityStrategy

public void setEqualityStrategy(EqualityStrategy eqStrat)
Specified by:
setEqualityStrategy in interface Store

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface Store

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Store

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface Store

first

public Iterator first(java.lang.Object o)
Specified by:
first in interface Store

last

public Iterator last(java.lang.Object o)
Specified by:
last in interface Store

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface Store

toArray

public java.lang.Object[] toArray(java.lang.Object[] dest)
Specified by:
toArray in interface Store

set

public java.lang.Object set(int index,
                            java.lang.Object element)
Specified by:
set in interface Store

remove

public java.lang.Object remove(int index)
Specified by:
remove in interface Store