com.azalient.api.a.store
Interface ICompoundStore<I extends RecordRW>

All Superinterfaces:
Iterable<I>

public interface ICompoundStore<I extends RecordRW>
extends Iterable<I>

A compound store is a collection of two or more IStore stores. This interface gives a similar, but reduced interface to IStore.

For example there is a compound store of types, containing vehicle types and transport types. It is possible to pass a name to that compound store to lookup either a vehicle type or a transport types that matches the name


Method Summary
 void clear()
          Clear all objects from store
 Collection<I> collection()
          Get a collection interface
 List<I> list()
          Get a list interface
 I lookup(int name)
          lookup the object in the internal store
 I lookup(String name)
          lookup the object in the internal store
 I remove(I object)
          Remove the given object from the store, return the object if succesful, or null if unsuccessful
 int size()
          The number of elements in the store
 I[] toArray(I[] ta)
          return elements as an array
 int uniqueName()
          Return an integer name that is unique amongst all stores making up this compound
 int uniqueName(int start)
          Return an integer name that is unique amongst all stores making up this compound
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

size

int size()
The number of elements in the store


collection

Collection<I> collection()
Get a collection interface


list

List<I> list()
Get a list interface


toArray

I[] toArray(I[] ta)
return elements as an array


lookup

I lookup(String name)
lookup the object in the internal store


lookup

I lookup(int name)
lookup the object in the internal store


remove

I remove(I object)
Remove the given object from the store, return the object if succesful, or null if unsuccessful


clear

void clear()
Clear all objects from store


uniqueName

int uniqueName()
Return an integer name that is unique amongst all stores making up this compound


uniqueName

int uniqueName(int start)
Return an integer name that is unique amongst all stores making up this compound