public final class Feature extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Feature.STRATEGY
Feature strategy enum.
|
Constructor and Description |
---|
Feature(String id,
String description)
Default constructor (no feature inheritance).
|
Feature(String id,
String description,
Feature.STRATEGY strategy)
Alternative constructor allowing to customize
Feature.STRATEGY . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Features are like
enum s in that they are equal by identity. |
String |
getDescription() |
String |
getId() |
Feature.STRATEGY |
getStrategy() |
int |
hashCode() |
static Set<Feature> |
inherit(Collection<Feature> features,
Predicate<? super Feature> isSupported)
Inherit the given
features that are inheritable and
are supported by the caller. |
String |
toString() |
public Feature(String id, String description)
id
- the feature iddescription
- the feature descriptionpublic Feature(String id, String description, Feature.STRATEGY strategy)
Feature.STRATEGY
.id
- the feature iddescription
- the feature descriptionstrategy
- the feature Feature.STRATEGY
public String getId()
public String getDescription()
public Feature.STRATEGY getStrategy()
public boolean equals(Object obj)
enum
s in that they are equal by identity.public static Set<Feature> inherit(Collection<Feature> features, Predicate<? super Feature> isSupported)
features
that are inheritable and
are supported by the caller.features
- a collection of features to inheritisSupported
- a test of whether the caller supports any particular featureCopyright © 2019. All rights reserved.