Class FeatureList
java.lang.Object
de.hybris.platform.classification.features.FeatureList
A list of features for a product. This class is the service representation of
FeatureContainer-
Constructor Summary
ConstructorsConstructorDescriptionFeatureList(Feature... features) Initializes this object with variable array of features.FeatureList(List<Feature> features) Initializes this object with a list of features. -
Method Summary
Modifier and TypeMethodDescriptiongetFeatureByAssignment(ClassAttributeAssignmentModel assignment) Gets the feature by assignment.getFeatureByCode(String code) Returns the (typed) feature assigned to the attribute with the given code, or null if there's no such feature.getFeatureByName(String name) Returns the feature with the given name of null if there's no such feature.Returns the list of features.booleanbooleanisEmpty()iterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FeatureList
Initializes this object with a list of features.- Parameters:
features- the list of features- Throws:
IllegalArgumentException- if the list is null
-
FeatureList
Initializes this object with variable array of features.- Parameters:
features- the list of features- Throws:
IllegalArgumentException- if the list is null
-
-
Method Details
-
getFeatures
Returns the list of features. The list is unmodifiable.- Returns:
- the list of features
-
isEmpty
public boolean isEmpty()- Returns:
trueif this feature list contains no features at all.
-
getFeatureByName
Returns the feature with the given name of null if there's no such feature.- Parameters:
name- the of the feature to look up- Returns:
- the feature with the given name of null if there's no such feature
- Throws:
IllegalArgumentException- if the name is null
-
getFeatureByAssignment
Gets the feature by assignment.- Parameters:
assignment- the assignment- Returns:
- the feature by assignment
-
getFeatureByCode
Returns the (typed) feature assigned to the attribute with the given code, or null if there's no such feature.- Parameters:
code- the code of the attribute the feature is assigned to- Returns:
- the (typed) feature assigned to the attribute with the given code, or null if there's no such feature
- Throws:
IllegalArgumentException- if the code is null
-
iterator
-
getClassificationClasses
- Returns:
- a
HashSetwithClassificationClassModels.
-
getClassAttributeAssignments
- Returns:
- a
HashSetwithClassAttributeAssignmentModels.
-
hasUntypedFeatures
public boolean hasUntypedFeatures()- Returns:
trueif this feature list contains any untyped feature.
-