HomeSort by relevance Sort by last modified time
    Searched refs:iterable (Results 1 - 25 of 507) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /external/mockito/src/main/java/org/mockito/internal/util/
Checks.java 20 public static <T extends Iterable<?>> T checkItemsNotNull(T iterable, String checkedIterable) {
21 checkNotNull(iterable, checkedIterable);
22 for (Object item : iterable) {
25 return iterable;
  /external/guava/guava/src/com/google/common/collect/
FluentIterable.java 40 * {@code FluentIterable} provides a rich interface for manipulating {@code Iterable} instances in a
41 * chained fashion. A {@code FluentIterable} can be created from an {@code Iterable}, or from a set
73 public abstract class FluentIterable<E> implements Iterable<E> {
74 // We store 'iterable' and use it instead of 'this' to allow Iterables to perform instanceof
75 // checks on the _original_ iterable when FluentIterable.from is used.
76 private final Iterable<E> iterable; field in class:FluentIterable
80 this.iterable = this;
83 FluentIterable(Iterable<E> iterable) {
    [all...]
Iterables.java 44 * of type {@code Iterable}. Except as noted, each method has a corresponding
63 /** Returns an unmodifiable view of {@code iterable}. */
64 public static <T> Iterable<T> unmodifiableIterable(
65 final Iterable<T> iterable) {
66 checkNotNull(iterable);
67 if (iterable instanceof UnmodifiableIterable ||
68 iterable instanceof ImmutableCollection) {
69 return iterable;
71 return new UnmodifiableIterable<T>(iterable);
86 private final Iterable<T> iterable; field in class:Iterables.UnmodifiableIterable
    [all...]
AllEqualOrdering.java 41 public <E> List<E> sortedCopy(Iterable<E> iterable) {
42 return Lists.newArrayList(iterable);
46 public <E> ImmutableList<E> immutableSortedCopy(Iterable<E> iterable) {
47 return ImmutableList.copyOf(iterable);
ReverseNaturalOrdering.java 60 @Override public <E extends Comparable> E min(Iterable<E> iterable) {
61 return NaturalOrdering.INSTANCE.max(iterable);
76 @Override public <E extends Comparable> E max(Iterable<E> iterable) {
77 return NaturalOrdering.INSTANCE.min(iterable);
  /external/guava/guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/
FluentIterable.java 39 * {@code FluentIterable} provides a rich interface for manipulating {@code Iterable} instances in a
40 * chained fashion. A {@code FluentIterable} can be created from an {@code Iterable}, or from a set
72 public abstract class FluentIterable<E> implements Iterable<E> {
73 // We store 'iterable' and use it instead of 'this' to allow Iterables to perform instanceof
74 // checks on the _original_ iterable when FluentIterable.from is used.
75 private final Iterable<E> iterable; field in class:FluentIterable
79 this.iterable = this;
82 FluentIterable(Iterable<E> iterable) {
    [all...]
Iterables.java 42 * of type {@code Iterable}. Except as noted, each method has a corresponding
61 /** Returns an unmodifiable view of {@code iterable}. */
62 public static <T> Iterable<T> unmodifiableIterable(
63 final Iterable<T> iterable) {
64 checkNotNull(iterable);
65 if (iterable instanceof UnmodifiableIterable ||
66 iterable instanceof ImmutableCollection) {
67 return iterable;
69 return new UnmodifiableIterable<T>(iterable);
84 private final Iterable<T> iterable; field in class:Iterables.UnmodifiableIterable
    [all...]
  /external/guava/guava-testlib/test/com/google/common/collect/testing/
MinimalIterableTest.java 36 Iterable<String> iterable = MinimalIterable.<String>of(); local
37 Iterator<String> iterator = iterable.iterator();
45 iterable.iterator();
52 Iterable<String> iterable = MinimalIterable.of("a"); local
53 Iterator<String> iterator = iterable.iterator();
63 iterable.iterator();
70 Iterable<String> iterable local
87 Iterable<String> iterable local
    [all...]
  /external/mockito/src/test/java/org/mockitousage/bugs/
InheritedGenericsPolimorphicCallTest.java 27 protected interface MyIterable<T> extends Iterable<T> {
36 MyIterable<String> iterable = Mockito.mock(MyIterable.class); field in class:InheritedGenericsPolimorphicCallTest
40 Mockito.when(iterable.iterator()).thenReturn(myIterator);
41 Assert.assertNotNull(((Iterable<String>) iterable).iterator());
42 Assert.assertNotNull(iterable.iterator());
47 iterable.iterator();
49 verify(iterable).iterator();
50 verify((Iterable<String>) iterable).iterator()
    [all...]
  /external/smali/util/src/main/java/org/jf/util/
ImmutableConverter.java 49 public ImmutableList<ImmutableItem> toList(@Nullable final Iterable<? extends Item> iterable) {
50 if (iterable == null) {
55 if (iterable instanceof ImmutableList) {
56 for (Item element: iterable) {
67 return (ImmutableList<ImmutableItem>)iterable;
70 final Iterator<? extends Item> iter = iterable.iterator();
80 public ImmutableSet<ImmutableItem> toSet(@Nullable final Iterable<? extends Item> iterable) {
81 if (iterable == null)
    [all...]
  /external/mockito/src/main/java/org/mockito/internal/util/collections/
Iterables.java 18 * Converts enumeration into iterable
20 public static <T> Iterable<T> toIterable(Enumeration<T> in) {
29 * Returns first element of provided iterable or fails fast when iterable is empty.
31 * @param iterable non-empty iterable
32 * @return first element of supplied iterable
33 * @throws IllegalArgumentException when supplied iterable is empty
35 public static <T> T firstOf(Iterable<T> iterable) {
    [all...]
  /device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/
heapq.py 191 def nlargest(n, iterable):
194 Equivalent to: sorted(iterable, reverse=True)[:n]
196 it = iter(iterable)
207 def nsmallest(n, iterable):
210 Equivalent to: sorted(iterable)[:n]
212 if hasattr(iterable, '__len__') and n * 10 <= len(iterable):
215 it = iter(iterable)
228 # An alternative approach manifests the whole iterable in memory but
231 # insertion. Finding the n smallest of an m length iterable requires
    [all...]
  /external/smali/dexlib2/src/main/java/org/jf/dexlib2/immutable/util/
CharSequenceConverter.java 45 public static ImmutableList<String> immutableStringList(@Nullable Iterable<? extends CharSequence> iterable) {
46 return CONVERTER.toList(iterable);
  /external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
IterablesTest.java 59 Iterable<String> iterable = Collections.emptySet(); local
60 assertEquals(0, Iterables.size(iterable));
64 Iterable<String> iterable = Collections.singleton("a"); local
65 assertEquals(1, Iterables.size(iterable));
69 Iterable<Integer> iterable = new Iterable<Integer>() { local
75 assertEquals(2, Iterables.size(iterable));
89 private static Iterable<String> iterable(String... elements) { method in class:IterablesTest
    [all...]
  /external/hamcrest/hamcrest-library/src/main/java/org/hamcrest/collection/
IsEmptyIterable.java 10 public class IsEmptyIterable<E> extends TypeSafeMatcher<Iterable<? extends E>> {
13 public boolean matchesSafely(Iterable<? extends E> iterable) {
14 return !iterable.iterator().hasNext();
17 public void describeMismatchSafely(Iterable<? extends E> iter, Description mismatchDescription) {
23 description.appendText("an empty iterable");
27 * Creates a matcher for {@link Iterable}s matching examined iterables that yield no items.
32 public static <E> Matcher<Iterable<? extends E>> emptyIterable() {
37 * Creates a matcher for {@link Iterable}s matching examined iterables that yield no items.
42 * the type of the iterable's conten
    [all...]
  /external/libmojo/base/android/java/src/org/chromium/base/
CollectionUtil.java 35 public static <E> ArrayList<E> newArrayList(Iterable<E> iterable) {
37 for (E element : iterable) {
  /device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/
heapq.py 203 def nlargest(n, iterable):
206 Equivalent to: sorted(iterable, reverse=True)[:n]
210 it = iter(iterable)
221 def nsmallest(n, iterable):
224 Equivalent to: sorted(iterable)[:n]
228 it = iter(iterable)
399 def nsmallest(n, iterable, key=None):
402 Equivalent to: sorted(iterable, key=key)[:n]
404 # Short-cut for n==1 is to use min() when len(iterable)>0
406 it = iter(iterable)
    [all...]
  /external/python/cpython2/Lib/
heapq.py 203 def nlargest(n, iterable):
206 Equivalent to: sorted(iterable, reverse=True)[:n]
210 it = iter(iterable)
221 def nsmallest(n, iterable):
224 Equivalent to: sorted(iterable)[:n]
228 it = iter(iterable)
399 def nsmallest(n, iterable, key=None):
402 Equivalent to: sorted(iterable, key=key)[:n]
404 # Short-cut for n==1 is to use min() when len(iterable)>0
406 it = iter(iterable)
    [all...]
  /prebuilts/gdb/darwin-x86/lib/python2.7/
heapq.py 203 def nlargest(n, iterable):
206 Equivalent to: sorted(iterable, reverse=True)[:n]
210 it = iter(iterable)
221 def nsmallest(n, iterable):
224 Equivalent to: sorted(iterable)[:n]
228 it = iter(iterable)
394 def nsmallest(n, iterable, key=None):
397 Equivalent to: sorted(iterable, key=key)[:n]
399 # Short-cut for n==1 is to use min() when len(iterable)>0
401 it = iter(iterable)
    [all...]
  /prebuilts/gdb/linux-x86/lib/python2.7/
heapq.py 203 def nlargest(n, iterable):
206 Equivalent to: sorted(iterable, reverse=True)[:n]
210 it = iter(iterable)
221 def nsmallest(n, iterable):
224 Equivalent to: sorted(iterable)[:n]
228 it = iter(iterable)
394 def nsmallest(n, iterable, key=None):
397 Equivalent to: sorted(iterable, key=key)[:n]
399 # Short-cut for n==1 is to use min() when len(iterable)>0
401 it = iter(iterable)
    [all...]
  /prebuilts/python/darwin-x86/2.7.5/lib/python2.7/
heapq.py 203 def nlargest(n, iterable):
206 Equivalent to: sorted(iterable, reverse=True)[:n]
210 it = iter(iterable)
221 def nsmallest(n, iterable):
224 Equivalent to: sorted(iterable)[:n]
228 it = iter(iterable)
394 def nsmallest(n, iterable, key=None):
397 Equivalent to: sorted(iterable, key=key)[:n]
399 # Short-cut for n==1 is to use min() when len(iterable)>0
401 it = iter(iterable)
    [all...]
  /prebuilts/python/linux-x86/2.7.5/lib/python2.7/
heapq.py 203 def nlargest(n, iterable):
206 Equivalent to: sorted(iterable, reverse=True)[:n]
210 it = iter(iterable)
221 def nsmallest(n, iterable):
224 Equivalent to: sorted(iterable)[:n]
228 it = iter(iterable)
394 def nsmallest(n, iterable, key=None):
397 Equivalent to: sorted(iterable, key=key)[:n]
399 # Short-cut for n==1 is to use min() when len(iterable)>0
401 it = iter(iterable)
    [all...]
  /external/guava/guava-tests/test/com/google/common/collect/
IterablesTest.java 65 Iterable<String> iterable = Collections.emptySet(); local
66 assertEquals(0, Iterables.size(iterable));
70 Iterable<String> iterable = Collections.singleton("a"); local
71 assertEquals(1, Iterables.size(iterable));
75 Iterable<Integer> iterable = new Iterable<Integer>() { local
81 assertEquals(2, Iterables.size(iterable));
95 private static Iterable<String> iterable(String... elements) { method in class:IterablesTest
    [all...]
FluentIterableTest.java 68 FluentIterable<Integer> iterable = FluentIterable.from(asList(1)); local
69 assertSame(iterable, FluentIterable.from(iterable));
82 Iterable<Integer> iterable = new Iterable<Integer>() { local
88 assertEquals(2, FluentIterable.from(iterable).size());
102 Iterable<String> set = Sets.newHashSet("a", null, "b");
107 Iterable<String> set = ImmutableSortedSet.of("a", "b");
112 Iterable<String> iterable = iterable("a", null, "b") local
117 Iterable<String> iterable = iterable("a", "b"); local
137 Iterable<String> iterable = iterable("a", "b"); local
229 FluentIterable<String> iterable = FluentIterable.<String>from(list); local
241 FluentIterable<String> iterable = FluentIterable.<String>from(list); local
252 FluentIterable<String> iterable = FluentIterable.from(Lists.newArrayList("cool", "pants")); local
268 Iterable<Integer> iterable = local
278 Iterable<Integer> iterable = local
522 Iterable<String> iterable = Lists.newArrayList("foo", "bar", "baz"); local
710 Iterable<Integer> iterable = new Iterable<Integer>() { local
761 private static Iterable<String> iterable(String... elements) { method in class:FluentIterableTest
    [all...]
  /external/fonttools/Lib/fontTools/misc/
py23.py 31 def strjoin(iterable):
32 return ''.join(iterable)
82 def bytesjoin(iterable):
83 return b''.join(tobytes(item) for item in iterable)

Completed in 1286 milliseconds

1 2 3 4 5 6 7 8 91011>>