Lines Matching refs:Sets
36 * Unit tests for {@link Sets#union}, {@link Sets#intersection} and
37 * {@link Sets#difference}.
48 return Sets.union(
49 Sets.<String>newHashSet(), Sets.<String>newHashSet());
60 return Sets.union(
61 Sets.<String>newHashSet(elements), Sets.newHashSet(elements));
70 return Sets.union(
71 Sets.<String>newHashSet(), Sets.newHashSet(elements));
81 return Sets.union(
82 Sets.newHashSet(elements), Sets.<String>newHashSet());
93 // Put the sets in different orders for the hell of it
94 return Sets.union(
95 Sets.newLinkedHashSet(asList(elements)),
96 Sets.newLinkedHashSet(
108 return Sets.union(
109 Sets.newHashSet(elements[0]),
110 Sets.newHashSet(elements[1], elements[2]));
120 return Sets.union(
121 Sets.<String>newHashSet(elements[0], elements[1]),
122 Sets.newHashSet(elements[1], elements[2]));
132 return Sets.intersection(
133 Sets.<String>newHashSet(), Sets.<String>newHashSet());
143 return Sets.intersection(
144 Sets.<String>newHashSet(), Sets.newHashSet((String) null));
154 return Sets.intersection(
155 Sets.newHashSet("a", "b"), Sets.newHashSet("c", "d"));
165 return Sets.intersection(
166 Sets.newHashSet(elements), Sets.newHashSet(elements));
176 return Sets.intersection(
177 Sets.newHashSet("a", elements[0], "b"),
178 Sets.newHashSet("c", elements[0], "d"));
187 return Sets.difference(
188 Sets.<String>newHashSet(), Sets.<String>newHashSet());
198 return Sets.difference(Sets.newHashSet("a"), Sets.newHashSet("a"));
208 Set<String> set = Sets.newHashSet("b", "c");
209 Set<String> other = Sets.newHashSet("a", "b", "c", "d");
210 return Sets.difference(set, other);
220 Set<String> set = Sets.newHashSet(elements);
221 Set<String> other = Sets.newHashSet("wz", "xq");
224 return Sets.difference(set, other);
234 return Sets.difference(
235 Sets.newHashSet(elements), Sets.newHashSet());
245 return Sets.difference(
246 Sets.<String>newHashSet(elements), Sets.newHashSet("xx", "xq"));
262 friends = Sets.newHashSet("Tom", "Joe", "Dave");
263 enemies = Sets.newHashSet("Dick", "Harry", "Tom");
267 Set<String> all = Sets.union(friends, enemies);
270 ImmutableSet<String> immut = Sets.union(friends, enemies).immutableCopy();
272 = Sets.union(friends, enemies).copyInto(new HashSet<String>());
281 Set<String> friends = Sets.newHashSet("Tom", "Joe", "Dave");
282 Set<String> enemies = Sets.newHashSet("Dick", "Harry", "Tom");
284 Set<String> frenemies = Sets.intersection(friends, enemies);
288 = Sets.intersection(friends, enemies).immutableCopy();
290 = Sets.intersection(friends, enemies).copyInto(new HashSet<String>());
299 Set<String> friends = Sets.newHashSet("Tom", "Joe", "Dave");
300 Set<String> enemies = Sets.newHashSet("Dick", "Harry", "Tom");
302 Set<String> goodFriends = Sets.difference(friends, enemies);
306 = Sets.difference(friends, enemies).immutableCopy();
308 = Sets.difference(friends, enemies).copyInto(new HashSet<String>());
317 Set<String> friends = Sets.newHashSet("Tom", "Joe", "Dave");
318 Set<String> enemies = Sets.newHashSet("Dick", "Harry", "Tom");
320 Set<String> symmetricDifferenceFriendsFirst = Sets.symmetricDifference(
324 Set<String> symmetricDifferenceEnemiesFirst = Sets.symmetricDifference(
332 = Sets.symmetricDifference(friends, enemies).immutableCopy();
333 HashSet<String> mut = Sets.symmetricDifference(friends, enemies)
341 immut = Sets.symmetricDifference(enemies, friends).immutableCopy();
342 mut = Sets.symmetricDifference(enemies, friends).