public class MetadataCollection extends java.util.ArrayList<MetadataElement>
Collection
of MetadataElement
instance.In the adapter configuration file this class is aliased as metadata-collection which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
MetadataCollection() |
MetadataCollection(@NotNull KeyValuePairBag elements) |
MetadataCollection(@NotNull java.util.Map<java.lang.String,java.lang.String> elements) |
MetadataCollection(@NotNull MetadataCollection metadataCollection) |
MetadataCollection(MetadataElement... elements) |
MetadataCollection(@NotNull java.util.Set<MetadataElement> elements) |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.String> |
asMap(java.util.Collection<MetadataElement> col)
Helper to turn a set of metadata elements into
Map . |
static java.util.Properties |
asProperties(java.util.Collection<MetadataElement> col)
Helper to turn a set of metadata elements into
Properties . |
static java.util.Set<MetadataElement> |
asSet(java.util.Collection<MetadataElement> col)
Helper to turn a metadata elements into
Set . |
boolean |
containsKey(java.lang.String key)
Simple utility method that will scan the
MetadataElement 's and will check the each key equals the supplied key. |
java.util.Set<MetadataElement> |
toSet()
Will create an return a new
Set from this MetadataCollection |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public MetadataCollection()
public MetadataCollection(@NotNull @NotNull java.util.Set<MetadataElement> elements)
public MetadataCollection(@NotNull @NotNull MetadataCollection metadataCollection)
public MetadataCollection(@NotNull @NotNull KeyValuePairBag elements)
public MetadataCollection(@NotNull @NotNull java.util.Map<java.lang.String,java.lang.String> elements)
public MetadataCollection(@NotNull MetadataElement... elements)
public java.util.Set<MetadataElement> toSet()
Set
from this MetadataCollection
public boolean containsKey(java.lang.String key)
MetadataElement
's and will check the each key equals the supplied key.
Note, this method id case sensitive.key
- the key to search for.public static java.util.Set<MetadataElement> asSet(java.util.Collection<MetadataElement> col)
Set
.col
- the collectionSet
public static java.util.Properties asProperties(java.util.Collection<MetadataElement> col)
Properties
.col
- the collectionProperties
public static java.util.Map<java.lang.String,java.lang.String> asMap(java.util.Collection<MetadataElement> col)
Map
.col
- the collectionMap