Class SetOperations
java.lang.Object
net.ssehub.easy.varModel.cstEvaluation.SetOperations
Implements set operations.
- Author:
- Holger Eichelberger
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final IOperationEvaluatorImplements the difference (-) operation.(package private) static final IOperationEvaluatorImplements the "excluding" operation.(package private) static final IOperationEvaluatorImplements the "including" operation.(package private) static final IOperationEvaluatorImplements the symmetric difference operation.(package private) static final IOperationEvaluatorImplements the union operation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static final voidaddAll(ContainerOperations.ContainerArgument cnt, List<Value> result, HashSet<Value> done, EvaluationAccessor resAcc) Adds all elements incnttoresult.private static voidaddAllXor(ContainerOperations.ContainerArgument cnt, HashSet<Value> set1, HashSet<Value> set2, List<Value> result, EvaluationAccessor resAcc) Adds all elements fromcnttoresultif the individual elements are either inset1or inset2.static voidregister()Registers the defined operations.
-
Field Details
-
UNION
Implements the union operation. -
DIFFERENCE
Implements the difference (-) operation. -
SYMMETRIC_DIFFERENCE
Implements the symmetric difference operation. -
EXCLUDING
Implements the "excluding" operation. -
INCLUDING
Implements the "including" operation.
-
-
Constructor Details
-
SetOperations
private SetOperations()Prevent instance creation.
-
-
Method Details
-
register
public static void register()Registers the defined operations. -
addAll
private static final void addAll(ContainerOperations.ContainerArgument cnt, List<Value> result, HashSet<Value> done, EvaluationAccessor resAcc) Adds all elements incnttoresult.- Parameters:
cnt- the source of the elementsresult- the target (to be modified as a side effect)done- all elements considered so farresAcc- the result accessor for transferring bound elements
-
addAllXor
private static void addAllXor(ContainerOperations.ContainerArgument cnt, HashSet<Value> set1, HashSet<Value> set2, List<Value> result, EvaluationAccessor resAcc) Adds all elements fromcnttoresultif the individual elements are either inset1or inset2.- Parameters:
cnt- the container to take the values fromset1- the first setset2- the second setresult- the resulting elementsresAcc- result accessor for transferring bound elements
-