ahc.collection.store
Interface Store

All Known Implementing Classes:
ahc.collection.store.AbstractStore

public interface Store

A store serves as the internal place where collections store their data. A store knows nothing about special semantics like sort order, uniqueness of elements etc. but allows the actual collection efficient access to implement such aspects.

Author:
Arno Haase

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 n)
           
 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[] a)
           
 

Method Detail

preservesOrdering

public boolean preservesOrdering()
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()
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)

before

public Iterator before()

begin

public Iterator begin()

end

public Iterator end()

after

public Iterator after()

iter

public Iterator iter(int n)

first

public Iterator first(java.lang.Object o)

last

public Iterator last(java.lang.Object o)

compactSize

public void compactSize()

size

public int size()

isEmpty

public boolean isEmpty()

contains

public boolean contains(java.lang.Object o)

clear

public void clear()

toArray

public java.lang.Object[] toArray()

toArray

public java.lang.Object[] toArray(java.lang.Object[] a)

remove

public boolean remove(java.lang.Object o)

get

public java.lang.Object get(int index)

set

public java.lang.Object set(int index,
                            java.lang.Object element)

remove

public java.lang.Object remove(int index)

getEqualityStrategy

public EqualityStrategy getEqualityStrategy()

setEqualityStrategy

public void setEqualityStrategy(EqualityStrategy eqStrat)