F
- The feature type used.public class Features<F> extends Object
Constructor and Description |
---|
Features(Class<F> base)
Create a feature handler.
|
Modifier and Type | Method and Description |
---|---|
void |
add(F feature)
Add a trait.
|
<C> boolean |
contains(Class<C> feature)
Check if contains the following feature.
|
<C> C |
get(Class<C> feature)
Get a feature from its class.
|
Iterable<F> |
getAll()
Get all features.
|
Iterable<Class<? extends F>> |
getFeatures()
Get all features types.
|
public final void add(F feature)
feature
- The feature to add.public final <C> C get(Class<C> feature)
C
- The custom feature type.feature
- The feature class.LionEngineException
- If the feature was not found.public final <C> boolean contains(Class<C> feature)
C
- The custom feature type.feature
- The feature to check.true
if contains, false
else.Copyright © 2016 Byron 3D Games Studio. All rights reserved.