Class Sets
java.lang.Object
tools.refinery.interpreter.matchers.util.Sets
This class was motivated by the similar Sets class from Guava to provide simple set manipulation
functionality. However, as starting with version 2.3 the runtime of VIATRA Query should not depend on Guava,
not even internally, the relevant subset of Sets methods will be reimplemented here.
The current approach is to delegate to Eclipse Collections wherever possible. Such glue methods are useful so that downstream clients can avoid directly depending on Eclipse Collections.
Without an equivalent from Eclipse Collections, cartesianProduct(List)
is implemented here from scratch.
- Since:
- 2.3
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncartesianProduct
(List<? extends Set<? extends A>> setsList) static <A> Set
<A> difference
(Set<A> left, Set<A> right) static <A> Set
<A> intersection
(Set<A> left, Set<A> right) static <A> Set
<A> static <A> Set
<A>
-
Constructor Details
-
Sets
public Sets()
-
-
Method Details
-
newSet
- Since:
- 2.4
-
intersection
-
difference
-
union
-
powerSet
-
cartesianProduct
-