Home | History | Annotate | Download | only in collect

Lines Matching refs:sets

61 public final class Sets {
62 private Sets() {}
411 * Set<Object> identityHashSet = Sets.newSetFromMap(
495 * An unmodifiable view of a set which may be backed by other sets; this view
496 * will change as the backing sets do. Contains methods to copy the data into
521 * all the sets involved are based on the same notion of equivalence.
534 * Returns an unmodifiable <b>view</b> of the union of two sets. The returned
540 * <p>Results are undefined if {@code set1} and {@code set2} are sets based on
545 * smaller of the two sets. If you have reason to believe one of your sets
554 // sorted sets and use that instead if so
585 * Returns an unmodifiable <b>view</b> of the intersection of two sets. The
586 * returned set contains all elements that are contained by both backing sets.
589 * <p>Results are undefined if {@code set1} and {@code set2} are sets based
594 * set1} is the smaller of the two sets. If you have reason to believe one of
595 * your sets will generally be smaller than the other, pass it first.
596 * Unfortunately, since this method sets the generic type of the returned set
605 * Set<String> badStrings = (Set) Sets.intersection(
616 // sorted sets and use that instead if so
640 * Returns an unmodifiable <b>view</b> of the difference of two sets. The
646 * <p>Results are undefined if {@code set1} and {@code set2} are sets based
656 // sorted sets and use that instead if so
729 * from each of the given sets in order; the "n-ary
731 * product</a>" of the sets. For example: <pre class="code"> {@code
751 * empty, the Cartesian product will also be empty. If no sets at all are
755 * @param sets the sets to choose elements from, in the order that
756 * the elements chosen from those sets should appear in the resulting
762 * @throws NullPointerException if {@code sets}, any one of the {@code sets},
767 List<? extends Set<? extends B>> sets) {
768 CartesianSet<B> cartesianSet = new CartesianSet<B>(sets);
774 * from each of the given sets in order; the "n-ary
776 * product</a>" of the sets. For example: <pre class="code"> {@code
796 * empty, the Cartesian product will also be empty. If no sets at all are
800 * @param sets the sets to choose elements from, in the order that
801 * the elements chosen from those sets should appear in the resulting
807 * @throws NullPointerException if {@code sets}, any one of the {@code sets},
812 Set<? extends B>... sets) {
813 return cartesianProduct(Arrays.asList(sets));
820 CartesianSet(List<? extends Set<? extends B>> sets) {
823 for (Set<? extends B> set : sets) {