public class ImmutableMetaCollection<S> extends Object implements MetaCollection<S>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the meta collection of meta values
|
<T extends Meta<S>> |
contains(Class<T> cls)
Obtains whether a mapping of the type provided exists within the collection
|
static <T extends MetaOwner> |
copyOf(MetaCollection<T> collection) |
<T extends Meta<S>> |
get(Class<T> cls)
Obtains the metadata value from the component type specified
|
void |
iterate(java.util.function.Consumer<Map.Entry<Class<? extends Meta<S>>,Meta<S>>> consumer)
Iterates the collection
|
<T extends Meta<S>> |
put(Class<T> cls,
T meta)
Puts a mapping of a meta class and the meta value into the collection, replacing the existing
value if necessary
|
<T extends Meta<S>> |
put(T meta)
Puts the meta value into the collection, inferring the type
|
<T extends Meta<S>> |
putIfAbsent(Class<T> cls,
T meta)
Appends the meta mapping only if it does not already exist as defined by
MetaCollection.contains(Class). |
<T extends Meta<S>> |
putIfAbsent(T meta)
Puts the meta value into the collection if it does not exist as defined by
MetaCollection.contains(Class) |
<T extends Meta<S>> |
remove(Class<T> cls)
Removes the meta tag from this collection
|
public static <T extends MetaOwner> MetaCollection<T> copyOf(MetaCollection<T> collection)
public <T extends Meta<S>> T get(Class<T> cls)
MetaCollectionget in interface MetaCollection<S>T - the meta value typecls - the component typepublic <T extends Meta<S>> void put(T meta)
MetaCollectionput in interface MetaCollection<S>T - the meta typemeta - the meta to putpublic <T extends Meta<S>> boolean putIfAbsent(T meta)
MetaCollectionMetaCollection.contains(Class)putIfAbsent in interface MetaCollection<S>T - the meta typemeta - the meta value to puttrue if the operation changed the collection, false if it had no effectpublic <T extends Meta<S>> void put(Class<T> cls, T meta)
MetaCollectionput in interface MetaCollection<S>T - the meta value typecls - the meta typemeta - the meta valuepublic <T extends Meta<S>> boolean putIfAbsent(Class<T> cls, T meta)
MetaCollectionMetaCollection.contains(Class).
Otherwise has no effect.putIfAbsent in interface MetaCollection<S>T - the meta value typecls - the meta typemeta - the meta valuetrue if this operation changed the collection, false if it had no effectpublic <T extends Meta<S>> boolean contains(Class<T> cls)
MetaCollectioncontains in interface MetaCollection<S>T - the meta value typecls - the meta typetrue if it exists, false if it doesn'tpublic <T extends Meta<S>> T remove(Class<T> cls)
MetaCollectionremove in interface MetaCollection<S>T - the meta value typecls - the meta type to removenull if this operation had no effectpublic void iterate(java.util.function.Consumer<Map.Entry<Class<? extends Meta<S>>,Meta<S>>> consumer)
MetaCollectioniterate in interface MetaCollection<S>consumer - the iteration functionpublic void clear()
MetaCollectionclear in interface MetaCollection<S>Copyright © 2016. All rights reserved.