|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.irm.engine.core.general.LabelCollectionFactory
public final class LabelCollectionFactory
Label collection factory and utilities. This class provides methods for creating new instances of Label
collections as well as providing a number of collection based utility methods and fields. These methods are provided mainly for convenience and to provide a consistent way to create Label collections. Methods that take collection parameters make no assumptions about what collection implementation is used, so the use of these factory style methods is at the developers discretion.
Field Summary | |
---|---|
static Collection<Label> |
EMPTY_LABELS An empty Label collection. |
Method Summary | |
---|---|
static Collection<Label> |
copyLabels(Collection<Label> collection) Create a shallow copy of a Label collection. |
static Collection<Label> |
createLabels(int capacity) Create an empty Label collection with a capacity specified. |
static Collection<Label> |
createLabels(Label... elements) Create a Label collection containing zero or more elements. |
static Label |
getLabelByLocale(Collection<Label> collection, Locale key) Get an element from a Label collection by Locale. |
static Map<Locale,Label> |
labelsAsMap(Collection<Label> collection) Create a map keyed on Locale from a collection of Label elements. |
static Set<Label> |
labelsAsSet(Collection<Label> collection) Create a set of Label elements from a collection. |
static Collection<Label> |
unmodifiableLabels(Collection<Label> value) Create an immutable shallow copy of a Label collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Collection<Label> EMPTY_LABELS
Method Detail |
---|
public static Collection<Label> createLabels(Label... elements)
elements
- The elements to add into the collection.public static Collection<Label> createLabels(int capacity)
capacity
- The initial collection capacity.public static Collection<Label> copyLabels(Collection<Label> collection)
collection
- The collection to copy.public static Set<Label> labelsAsSet(Collection<Label> collection)
collection
- The collection to copy.public static Collection<Label> unmodifiableLabels(Collection<Label> value)
value
- The collection to copy.public static Map<Locale,Label> labelsAsMap(Collection<Label> collection)
collection
- The collection to convert to a map.public static Label getLabelByLocale(Collection<Label> collection, Locale key)
collection
- The collection.key
- The key.
|
Oracle® Information Rights Management Server Java API Reference 11g Release 1 (11.1.1) E12907-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |