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