Interface Types
- All Known Implementing Classes:
TypeEnumSet, TypeRefSet, TypeSet
A collection of
org.osid.type.Types, each uniquely
identified by its namespace, authority, and identifier. It is
designed to help a provider track which types it supports.
The interface is Iterable, so the supported types can be
walked with a for-each loop. null types are rejected.
Implementations differ in how repeated adds are handled: a plain
set (TypeSet) ignores them, while a reference-counted set
(TypeRefSet) keeps a type until every add is matched by a
remove.-
Method Summary
Methods inherited from interface Iterable
forEach, iterator, spliterator
-
Method Details
-
add
Tracks a supported type.- Parameters:
type- the type to add- Throws:
NullArgumentException-typeisnull
-
remove
Removes a type.- Parameters:
type- the type to remove- Throws:
NullArgumentException-typeisnull
-
contains
Tests for the existience of a type.- Parameters:
type- the type to test for- Returns:
trueif the type exists,falseotherwise- Throws:
NullArgumentException-typeisnull
-
toCollection
-
toArray
-
clear
void clear()Removes all types.
-