Package net.okapia.osid.torrefacto.collect
package net.okapia.osid.torrefacto.collect
Collection utilities used across the OSID implementations,
organized into two groups.
Multimaps
AMultiMap maps each key
to a collection of values. MultiHashMap is the standard
set-multimap implementation (duplicate values under a key collapse,
insertion order is preserved, null keys and values are rejected).
Collections supplies
read-only and synchronized wrappers, implemented by UnmodifiableMultiMap and SynchronizedMultiMap.
IdHashMap, IdMultiHashMap, TypeHashMap, and TypeMultiHashMap are thin
subclasses that fix the key type to org.osid.id.Id or
org.osid.type.Type; they add no behavior of their own.
Type collections
ATypes collection tracks
the org.osid.type.Types a provider supports. TypeSet holds each type once;
TypeRefSet
reference-counts so a type survives until its last registration is
withdrawn; TypeEnumSet draws its members
from a Java enum and maps a type back to its constant. The
TypeEnum and IdEnum interfaces mark enum
constants that carry a type or id.-
ClassDescriptionStatic factory methods for
MultiMap, mirroring the wrappersCollectionsprovides for the standard collections.Extracts theIdsfrom a collection ofIdentifiables.An interface for enumerating ids.IdHashMap<V>ALinkedHashMapwhose keys are hardened toorg.osid.id.Id.AMultiHashMapwhose keys are hardened toorg.osid.id.Id.MultiHashMap<K,V> AMultiMapthat maps each key to a set of values, backed by aLinkedHashMapof keys toLinkedHashSets.MultiMap<K,V> A map that associates each key with a collection of values rather than a single value.SynchronizedMultiMap<K,V> A thread-safe view of aMultiMap.An interface for enumerating types.ATypeSetwhose members are drawn from a Javaenum.TypeHashMap<V>ALinkedHashMapwhose keys are hardened toorg.osid.type.Type.AMultiHashMapwhose keys are hardened toorg.osid.type.Type.A reference-countedTypescollection.A collection oforg.osid.type.Types, each uniquely identified by its namespace, authority, and identifier.ATypescollection that holds each type at most once.UnmodifiableMultiMap<K,V> A read-only view of aMultiMap.