Home | History | Annotate | Download | only in collect

Lines Matching defs:iterable

67     FluentIterable<Integer> iterable = FluentIterable.from(asList(1));
68 assertSame(iterable, FluentIterable.from(iterable));
76 Iterable<Integer> iterable = new Iterable<Integer>() {
82 assertEquals(2, FluentIterable.from(iterable).size());
96 Iterable<String> set = Sets.newHashSet("a", null, "b");
101 Iterable<String> set = ImmutableSortedSet.of("a", "b");
106 Iterable<String> iterable = iterable("a", null, "b");
107 assertTrue(FluentIterable.from(iterable).contains(null));
111 Iterable<String> iterable = iterable("a", "b");
112 assertFalse(FluentIterable.from(iterable).contains(null));
116 Iterable<String> set = Sets.newHashSet("a", null, "b");
121 Iterable<String> set = Sets.newHashSet("a", "b");
126 Iterable<String> set = iterable("a", null, "b");
131 Iterable<String> iterable = iterable("a", "b");
132 assertFalse(FluentIterable.from(iterable).contains("c"));
186 @GwtIncompatible("Iterables.filter(Iterable, Class)")
191 Iterable<TypeB> blist = alist.filter(TypeB.class);
197 FluentIterable<String> iterable = FluentIterable.<String>from(list);
200 assertFalse(iterable.anyMatch(predicate));
202 assertFalse(iterable.anyMatch(predicate));
204 assertTrue(iterable.anyMatch(predicate));
209 FluentIterable<String> iterable = FluentIterable.<String>from(list);
212 assertTrue(iterable.allMatch(predicate));
214 assertTrue(iterable.allMatch(predicate));
216 assertFalse(iterable.allMatch(predicate));
220 FluentIterable<String> iterable = FluentIterable.from(Lists.newArrayList("cool", "pants"));
221 assertEquals(Optional.of("cool"), iterable.firstMatch(Predicates.equalTo("cool")));
222 assertEquals(Optional.of("pants"), iterable.firstMatch(Predicates.equalTo("pants")));
223 assertEquals(Optional.absent(), iterable.firstMatch(Predicates.alwaysFalse()));
224 assertEquals(Optional.of("cool"), iterable.firstMatch(Predicates.alwaysTrue()));
236 Iterable<Integer> iterable =
239 assertEquals(asList(1, 2, 3), Lists.newArrayList(iterable));
240 assertCanIterateAgain(iterable);
241 assertEquals("[1, 2, 3]", iterable.toString());
246 Iterable<Integer> iterable =
249 Iterator<Integer> resultIterator = iterable.iterator();
268 Iterable<String> result = FluentIterable.from(input).transform(new StringValueOfFunction());
284 Iterable<String> result =
490 Iterable<String> iterable = Lists.newArrayList("foo", "bar", "baz");
491 FluentIterable<String> limited = FluentIterable.from(iterable).limit(2);
678 Iterable<Integer> iterable = new Iterable<Integer>() {
685 ASSERT.that(FluentIterable.from(iterable).copyInto(list))
712 private static void assertCanIterateAgain(Iterable<?> iterable) {
713 for (@SuppressWarnings("unused") Object obj : iterable) {
721 private static Iterable<String> iterable(String... elements) {
723 return new Iterable<String>() {