Class SetOperations


  • public class SetOperations
    extends java.lang.Object
    Implements set operations.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • SetOperations

        private SetOperations()
        Prevent instance creation.
    • Method Detail

      • register

        public static void register()
        Registers the defined operations.
      • addAll

        private static final void addAll​(ContainerOperations.ContainerArgument cnt,
                                         java.util.List<Value> result,
                                         java.util.HashSet<Value> done,
                                         EvaluationAccessor resAcc)
        Adds all elements in cnt to result.
        Parameters:
        cnt - the source of the elements
        result - the target (to be modified as a side effect)
        done - all elements considered so far
        resAcc - the result accessor for transferring bound elements
      • addAllXor

        private static void addAllXor​(ContainerOperations.ContainerArgument cnt,
                                      java.util.HashSet<Value> set1,
                                      java.util.HashSet<Value> set2,
                                      java.util.List<Value> result,
                                      EvaluationAccessor resAcc)
        Adds all elements from cnt to result if the individual elements are either in set1 or in set2.
        Parameters:
        cnt - the container to take the values from
        set1 - the first set
        set2 - the second set
        result - the resulting elements
        resAcc - result accessor for transferring bound elements