com.partnersoft.data
Class IndexedIdentifiableSet<E extends Identifiable>

java.lang.Object
  extended by com.partnersoft.data.IndexedIdentifiableSet<E>
All Implemented Interfaces:
IdentifiableSet<E>, java.lang.Iterable<E>, java.util.Collection<E>, java.util.Set<E>

public class IndexedIdentifiableSet<E extends Identifiable>
extends java.lang.Object
implements IdentifiableSet<E>


Constructor Summary
IndexedIdentifiableSet()
           
IndexedIdentifiableSet(boolean indexByName, boolean indexById, boolean indexByGuid)
           
 
Method Summary
 boolean add(E object)
           
 boolean addAll(java.util.Collection<? extends E> objects)
           
 void clear()
           
 boolean contains(java.lang.Object object)
           
 boolean containsAll(java.util.Collection<?> objects)
           
 E forGuid(java.lang.String guid)
           
 E forId(int id)
           
 boolean isEmpty()
           
 java.util.Iterator<E> iterator()
           
 E named(java.lang.String name)
           
 boolean remove(java.lang.Object object)
           
 boolean removeAll(java.util.Collection<?> objects)
           
 boolean retainAll(java.util.Collection<?> objects)
           
 int size()
           
 java.lang.Object[] toArray()
           
<T> T[]
toArray(T[] array)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Set
equals, hashCode
 

Constructor Detail

IndexedIdentifiableSet

public IndexedIdentifiableSet(boolean indexByName,
                              boolean indexById,
                              boolean indexByGuid)

IndexedIdentifiableSet

public IndexedIdentifiableSet()
Method Detail

forGuid

public E forGuid(java.lang.String guid)
Specified by:
forGuid in interface IdentifiableSet<E extends Identifiable>

forId

public E forId(int id)
Specified by:
forId in interface IdentifiableSet<E extends Identifiable>

named

public E named(java.lang.String name)
Specified by:
named in interface IdentifiableSet<E extends Identifiable>

add

public boolean add(E object)
Specified by:
add in interface java.util.Collection<E extends Identifiable>
Specified by:
add in interface java.util.Set<E extends Identifiable>

addAll

public boolean addAll(java.util.Collection<? extends E> objects)
Specified by:
addAll in interface java.util.Collection<E extends Identifiable>
Specified by:
addAll in interface java.util.Set<E extends Identifiable>

clear

public void clear()
Specified by:
clear in interface java.util.Collection<E extends Identifiable>
Specified by:
clear in interface java.util.Set<E extends Identifiable>

contains

public boolean contains(java.lang.Object object)
Specified by:
contains in interface java.util.Collection<E extends Identifiable>
Specified by:
contains in interface java.util.Set<E extends Identifiable>

containsAll

public boolean containsAll(java.util.Collection<?> objects)
Specified by:
containsAll in interface java.util.Collection<E extends Identifiable>
Specified by:
containsAll in interface java.util.Set<E extends Identifiable>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection<E extends Identifiable>
Specified by:
isEmpty in interface java.util.Set<E extends Identifiable>

iterator

public java.util.Iterator<E> iterator()
Specified by:
iterator in interface java.lang.Iterable<E extends Identifiable>
Specified by:
iterator in interface java.util.Collection<E extends Identifiable>
Specified by:
iterator in interface java.util.Set<E extends Identifiable>

remove

public boolean remove(java.lang.Object object)
Specified by:
remove in interface java.util.Collection<E extends Identifiable>
Specified by:
remove in interface java.util.Set<E extends Identifiable>

removeAll

public boolean removeAll(java.util.Collection<?> objects)
Specified by:
removeAll in interface java.util.Collection<E extends Identifiable>
Specified by:
removeAll in interface java.util.Set<E extends Identifiable>

retainAll

public boolean retainAll(java.util.Collection<?> objects)
Specified by:
retainAll in interface java.util.Collection<E extends Identifiable>
Specified by:
retainAll in interface java.util.Set<E extends Identifiable>

size

public int size()
Specified by:
size in interface java.util.Collection<E extends Identifiable>
Specified by:
size in interface java.util.Set<E extends Identifiable>

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection<E extends Identifiable>
Specified by:
toArray in interface java.util.Set<E extends Identifiable>

toArray

public <T> T[] toArray(T[] array)
Specified by:
toArray in interface java.util.Collection<E extends Identifiable>
Specified by:
toArray in interface java.util.Set<E extends Identifiable>