Package net.okapia.osid.torrefacto.collect


package net.okapia.osid.torrefacto.collect
Collection utilities used across the OSID implementations, organized into two groups.

Multimaps

A MultiMap 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

A Types 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.
  • Class
    Description
    Static factory methods for MultiMap, mirroring the wrappers Collections provides for the standard collections.
    Extracts the Ids from a collection of Identifiables.
    An interface for enumerating ids.
    A LinkedHashMap whose keys are hardened to org.osid.id.Id.
    A MultiHashMap whose keys are hardened to org.osid.id.Id.
    A MultiMap that maps each key to a set of values, backed by a LinkedHashMap of keys to LinkedHashSets.
    A map that associates each key with a collection of values rather than a single value.
    A thread-safe view of a MultiMap.
    An interface for enumerating types.
    TypeEnumSet<E extends Enum<E> & TypeEnum>
    A TypeSet whose members are drawn from a Java enum.
    A LinkedHashMap whose keys are hardened to org.osid.type.Type.
    A MultiHashMap whose keys are hardened to org.osid.type.Type.
    A reference-counted Types collection.
    A collection of org.osid.type.Types, each uniquely identified by its namespace, authority, and identifier.
    A Types collection that holds each type at most once.
    A read-only view of a MultiMap.