Package org.eclipse.emfforms.common
Class Feature
- java.lang.Object
-
- org.eclipse.emfforms.common.Feature
-
public final class Feature extends java.lang.ObjectECP feature representation.- Since:
- 1.15
- Author:
- Mat Hansen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFeature.STRATEGYFeature strategy enum.
-
Constructor Summary
Constructors Constructor Description Feature(java.lang.String id, java.lang.String description)Default constructor (no feature inheritance).Feature(java.lang.String id, java.lang.String description, Feature.STRATEGY strategy)Alternative constructor allowing to customizeFeature.STRATEGY.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Features are likeenums in that they are equal by identity.java.lang.StringgetDescription()java.lang.StringgetId()Feature.STRATEGYgetStrategy()inthashCode()static java.util.Set<Feature>inherit(java.util.Collection<Feature> features, java.util.function.Predicate<? super Feature> isSupported)Inherit the givenfeaturesthat are inheritable and are supported by the caller.java.lang.StringtoString()
-
-
-
Constructor Detail
-
Feature
public Feature(java.lang.String id, java.lang.String description)Default constructor (no feature inheritance).- Parameters:
id- the feature iddescription- the feature description
-
Feature
public Feature(java.lang.String id, java.lang.String description, Feature.STRATEGY strategy)Alternative constructor allowing to customizeFeature.STRATEGY.- Parameters:
id- the feature iddescription- the feature descriptionstrategy- the featureFeature.STRATEGY
-
-
Method Detail
-
getId
public java.lang.String getId()
- Returns:
- the id
-
getDescription
public java.lang.String getDescription()
- Returns:
- the description
-
getStrategy
public Feature.STRATEGY getStrategy()
- Returns:
- the strategy
-
equals
public boolean equals(java.lang.Object obj)
Features are likeenums in that they are equal by identity.- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
inherit
public static java.util.Set<Feature> inherit(java.util.Collection<Feature> features, java.util.function.Predicate<? super Feature> isSupported)
Inherit the givenfeaturesthat are inheritable and are supported by the caller.- Parameters:
features- a collection of features to inheritisSupported- a test of whether the caller supports any particular feature- Returns:
- the supported inherited features
- Since:
- 1.21
-
-