Package com.adaptris.core
Class MetadataCollection
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<MetadataElement>,Collection<MetadataElement>,List<MetadataElement>,RandomAccess
A container class for handling a
Collection of MetadataElement instance.- See Also:
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.
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionMetadataCollection(@NotNull MetadataCollection metadataCollection) MetadataCollection(@NotNull MetadataElement... elements) MetadataCollection(@NotNull KeyValuePairBag elements) MetadataCollection(@NotNull Map<String, String> elements) MetadataCollection(@NotNull Set<MetadataElement> elements) -
Method Summary
Modifier and TypeMethodDescriptionasMap(Collection<MetadataElement> col) Helper to turn a set of metadata elements intoMap.static PropertiesHelper to turn a set of metadata elements intoProperties.static Set<MetadataElement>asSet(Collection<MetadataElement> col) Helper to turn a metadata elements intoSet.booleancontainsKey(String key) Simple utility method that will scan theMetadataElement's and will check the each key equals the supplied key.toSet()Will create an return a newSetfrom thisMetadataCollectionMethods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
Constructor Details
-
MetadataCollection
public MetadataCollection() -
MetadataCollection
-
MetadataCollection
-
MetadataCollection
-
MetadataCollection
-
MetadataCollection
-
-
Method Details
-
toSet
Will create an return a newSetfrom thisMetadataCollection- Returns:
- a set of metadata elements.
-
containsKey
Simple utility method that will scan theMetadataElement's and will check the each key equals the supplied key. Note, this method id case sensitive.- Parameters:
key- the key to search for.- Returns:
- true if the collection contains this key.
-
asSet
Helper to turn a metadata elements intoSet.- Parameters:
col- the collection- Returns:
- a
Set
-
asProperties
Helper to turn a set of metadata elements intoProperties.- Parameters:
col- the collection- Returns:
- a
Properties
-
asMap
Helper to turn a set of metadata elements intoMap.- Parameters:
col- the collection- Returns:
- a
Map
-