@ThreadSafe public interface MetaCollection<S>
Meta
objectsModifier 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
|
<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
contains(Class) . |
<T extends Meta<S>> |
putIfAbsent(T meta)
Puts the meta value into the collection if it does not exist as defined by
contains(Class) |
<T extends Meta<S>> |
remove(Class<T> cls)
Removes the meta tag from this collection
|
<T extends Meta<S>> T get(Class<T> cls)
T
- the meta value typecls
- the component type<T extends Meta<S>> void put(T meta)
T
- the meta typemeta
- the meta to put<T extends Meta<S>> boolean putIfAbsent(T meta)
contains(Class)
T
- the meta typemeta
- the meta value to puttrue
if the operation changed the collection, false
if it had no effect<T extends Meta<S>> void put(Class<T> cls, T meta)
T
- the meta value typecls
- the meta typemeta
- the meta value<T extends Meta<S>> boolean putIfAbsent(Class<T> cls, T meta)
contains(Class)
.
Otherwise has no effect.T
- the meta value typecls
- the meta typemeta
- the meta valuetrue
if this operation changed the collection, false
if it had no effect<T extends Meta<S>> boolean contains(Class<T> cls)
T
- the meta value typecls
- the meta typetrue
if it exists, false
if it doesn't<T extends Meta<S>> T remove(Class<T> cls)
T
- the meta value typecls
- the meta type to removenull
if this operation had no effectvoid iterate(java.util.function.Consumer<Map.Entry<Class<? extends Meta<S>>,Meta<S>>> consumer)
consumer
- the iteration functionvoid clear()
Copyright © 2016. All rights reserved.