Class ProductSwitchResults
java.lang.Object
org.faktorips.runtime.productswitch.ProductSwitchResults
This class represents the results of a product switch operation. It provides methods to retrieve
the switch result for a specific
IConfigurableModelObject as well as views of successful
and failed switch results.- Since:
- 23.6
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the result of a failed product switch operation.static interfaceThis interface represents the result of a product switch operation for a single model object.static classRepresents the result of a successful product switch operation. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new instance ofProductSwitchResultswith the specified map ofproduct switch results. -
Method Summary
Modifier and TypeMethodDescriptionasMap()Returns an unmodifiable view of all switch results.booleanReturns an unmodifiable view of all failed switch results.getResultFor(IConfigurableModelObject modelObject) Returns the switch result for the given model object ornullif the model object was not switched, for example if it isn't part of the original object tree or no switch target was found for a parent model object.intsize()Returns an unmodifiable view of all successful switch results.
-
Constructor Details
-
ProductSwitchResults
public ProductSwitchResults(Map<IConfigurableModelObject, ProductSwitchResults.ProductSwitchResult> result) Constructs a new instance ofProductSwitchResultswith the specified map ofproduct switch results.- Parameters:
result- the map of switch results
-
-
Method Details
-
asMap
Returns an unmodifiable view of all switch results.- Returns:
- the map of switch results
-
getResultFor
Returns the switch result for the given model object ornullif the model object was not switched, for example if it isn't part of the original object tree or no switch target was found for a parent model object.- Parameters:
modelObject- the model object- Returns:
- the switch result for the model object
-
successfulAsMap
Returns an unmodifiable view of all successful switch results.- Returns:
- the map of successful switch results
-
failureAsMap
Returns an unmodifiable view of all failed switch results.- Returns:
- the map of failed switch results
-
containsFailures
public boolean containsFailures()- Returns:
trueif at least one failed switch result is contained in the result; otherwisefalse
-
size
public int size()- Returns:
- the number of all results
-