Home
last modified time | relevance | path

Searched refs:iterable (Results 1 – 25 of 429) sorted by relevance

12345678910>>...18

/external/guava/guava/src/com/google/common/collect/
DIterables.java71 public static <T> Iterable<T> unmodifiableIterable(final Iterable<? extends T> iterable) { in unmodifiableIterable() argument
72 checkNotNull(iterable); in unmodifiableIterable()
73 if (iterable instanceof UnmodifiableIterable || iterable instanceof ImmutableCollection) { in unmodifiableIterable()
75 Iterable<T> result = (Iterable<T>) iterable; in unmodifiableIterable()
78 return new UnmodifiableIterable<>(iterable); in unmodifiableIterable()
88 public static <E> Iterable<E> unmodifiableIterable(ImmutableCollection<E> iterable) { in unmodifiableIterable() argument
89 return checkNotNull(iterable); in unmodifiableIterable()
93 private final Iterable<? extends T> iterable; field in Iterables.UnmodifiableIterable
95 private UnmodifiableIterable(Iterable<? extends T> iterable) { in UnmodifiableIterable() argument
96 this.iterable = iterable; in UnmodifiableIterable()
[all …]
DFluentIterable.java122 FluentIterable(Iterable<E> iterable) { in FluentIterable() argument
123 checkNotNull(iterable); in FluentIterable()
124 this.iterableDelegate = Optional.fromNullable(this != iterable ? iterable : null); in FluentIterable()
138 public static <E> FluentIterable<E> from(final Iterable<E> iterable) { in from() argument
139 return (iterable instanceof FluentIterable) in from()
140 ? (FluentIterable<E>) iterable in from()
141 : new FluentIterable<E>(iterable) { in from()
144 return iterable.iterator(); in from()
173 public static <E> FluentIterable<E> from(FluentIterable<E> iterable) {
174 return checkNotNull(iterable);
[all …]
/external/guava/android/guava/src/com/google/common/collect/
DIterables.java68 public static <T> Iterable<T> unmodifiableIterable(final Iterable<? extends T> iterable) { in unmodifiableIterable() argument
69 checkNotNull(iterable); in unmodifiableIterable()
70 if (iterable instanceof UnmodifiableIterable || iterable instanceof ImmutableCollection) { in unmodifiableIterable()
72 Iterable<T> result = (Iterable<T>) iterable; in unmodifiableIterable()
75 return new UnmodifiableIterable<>(iterable); in unmodifiableIterable()
85 public static <E> Iterable<E> unmodifiableIterable(ImmutableCollection<E> iterable) { in unmodifiableIterable() argument
86 return checkNotNull(iterable); in unmodifiableIterable()
90 private final Iterable<? extends T> iterable; field in Iterables.UnmodifiableIterable
92 private UnmodifiableIterable(Iterable<? extends T> iterable) { in UnmodifiableIterable() argument
93 this.iterable = iterable; in UnmodifiableIterable()
[all …]
DFluentIterable.java125 FluentIterable(Iterable<E> iterable) { in FluentIterable() argument
126 checkNotNull(iterable); in FluentIterable()
127 this.iterableDelegate = Optional.fromNullable(this != iterable ? iterable : null); in FluentIterable()
141 public static <E> FluentIterable<E> from(final Iterable<E> iterable) { in from() argument
142 return (iterable instanceof FluentIterable) in from()
143 ? (FluentIterable<E>) iterable in from()
144 : new FluentIterable<E>(iterable) { in from()
147 return iterable.iterator(); in from()
176 public static <E> FluentIterable<E> from(FluentIterable<E> iterable) {
177 return checkNotNull(iterable);
[all …]
/external/smali/dexlib2/src/main/java/org/jf/util/
DImmutableConverter.java49 public ImmutableList<ImmutableItem> toList(@Nullable final Iterable<? extends Item> iterable) { in toList() argument
50 if (iterable == null) { in toList()
55 if (iterable instanceof ImmutableList) { in toList()
56 for (Item element: iterable) { in toList()
67 return (ImmutableList<ImmutableItem>)iterable; in toList()
70 final Iterator<? extends Item> iter = iterable.iterator(); in toList()
80 public ImmutableSet<ImmutableItem> toSet(@Nullable final Iterable<? extends Item> iterable) {
81 if (iterable == null) {
86 if (iterable instanceof ImmutableSet) {
87 for (Item element: iterable) {
[all …]
/external/v8/src/builtins/
Dbuiltins-iterator-gen.cc137 TNode<Context> context, TNode<Object> iterable, TNode<Object> iterator_fn) { in IterableToList() argument
139 FillFixedArrayFromIterable(context, iterable, iterator_fn, &values); in IterableToList()
144 TNode<Context> context, TNode<Object> iterable, TNode<Object> iterator_fn) { in IterableToFixedArray() argument
146 FillFixedArrayFromIterable(context, iterable, iterator_fn, &values); in IterableToFixedArray()
152 TNode<Context> context, TNode<Object> iterable, TNode<Object> iterator_fn, in FillFixedArrayFromIterable() argument
155 IteratorRecord iterator_record = GetIterator(context, iterable, iterator_fn); in FillFixedArrayFromIterable()
185 auto iterable = Parameter<Object>(Descriptor::kIterable); in TF_BUILTIN() local
188 Return(IterableToList(context, iterable, iterator_fn)); in TF_BUILTIN()
193 auto iterable = Parameter<Object>(Descriptor::kIterable); in TF_BUILTIN() local
196 Return(IterableToFixedArray(context, iterable, iterator_fn)); in TF_BUILTIN()
[all …]
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ast/stmt/
DForEachStmt.java54 private Expression iterable; field in ForEachStmt
63 …public ForEachStmt(final VariableDeclarationExpr variable, final Expression iterable, final Statem… in ForEachStmt() argument
64 this(null, variable, iterable, body); in ForEachStmt()
71 …public ForEachStmt(TokenRange tokenRange, VariableDeclarationExpr variable, Expression iterable, S… in ForEachStmt() argument
74 setIterable(iterable); in ForEachStmt()
79 public ForEachStmt(VariableDeclarationExpr variable, String iterable, BlockStmt body) { in ForEachStmt() argument
80 this(null, variable, new NameExpr(iterable), body); in ForEachStmt()
102 return iterable; in getIterable()
125 public ForEachStmt setIterable(final Expression iterable) { in setIterable() argument
126 assertNotNull(iterable); in setIterable()
[all …]
/external/guava/guava-testlib/test/com/google/common/collect/testing/
DMinimalIterableTest.java34 Iterable<String> iterable = MinimalIterable.<String>of(); in testOf_empty() local
35 Iterator<String> iterator = iterable.iterator(); in testOf_empty()
43 iterable.iterator(); in testOf_empty()
50 Iterable<String> iterable = MinimalIterable.of("a"); in testOf_one() local
51 Iterator<String> iterator = iterable.iterator(); in testOf_one()
61 iterable.iterator(); in testOf_one()
68 Iterable<String> iterable = MinimalIterable.from(Collections.<String>emptySet()); in testFrom_empty() local
69 Iterator<String> iterator = iterable.iterator(); in testFrom_empty()
77 iterable.iterator(); in testFrom_empty()
84 Iterable<String> iterable = MinimalIterable.from(Collections.singleton("a")); in testFrom_one() local
[all …]
/external/guava/android/guava-testlib/test/com/google/common/collect/testing/
DMinimalIterableTest.java34 Iterable<String> iterable = MinimalIterable.<String>of(); in testOf_empty() local
35 Iterator<String> iterator = iterable.iterator(); in testOf_empty()
43 iterable.iterator(); in testOf_empty()
50 Iterable<String> iterable = MinimalIterable.of("a"); in testOf_one() local
51 Iterator<String> iterator = iterable.iterator(); in testOf_one()
61 iterable.iterator(); in testOf_one()
68 Iterable<String> iterable = MinimalIterable.from(Collections.<String>emptySet()); in testFrom_empty() local
69 Iterator<String> iterator = iterable.iterator(); in testFrom_empty()
77 iterable.iterator(); in testFrom_empty()
84 Iterable<String> iterable = MinimalIterable.from(Collections.singleton("a")); in testFrom_one() local
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javaparser_new_src/javaparser-core/com/github/javaparser/ast/stmt/
DForeachStmt.java39 private Expression iterable; field in ForeachStmt
47 final Expression iterable, final Statement body) { in ForeachStmt() argument
49 setIterable(iterable); in ForeachStmt()
54 final VariableDeclarationExpr var, final Expression iterable, in ForeachStmt() argument
58 setIterable(iterable); in ForeachStmt()
69 public ForeachStmt(VariableDeclarationExpr var, String iterable, BlockStmt body) { in ForeachStmt() argument
71 setIterable(new NameExpr(iterable)); in ForeachStmt()
91 return iterable; in getIterable()
105 public ForeachStmt setIterable(final Expression iterable) { in setIterable() argument
106 this.iterable = iterable; in setIterable()
[all …]
/external/python/cpython3/Doc/library/
Ditertools.rst52 :func:`chain.from_iterable` iterable p0, p1, ... plast, q0, q1, ... …
56 :func:`groupby` iterable[, key] sub-iterators grouped by value of k…
94 .. function:: accumulate(iterable[, func, *, initial=None])
101 of two arguments. Elements of the input *iterable* may be any type
107 Usually, the number of elements output matches the input iterable.
110 has one more element than the input iterable.
114 def accumulate(iterable, func=operator.add, *, initial=None):
119 it = iter(iterable)
136 can be modeled by supplying the initial value in the iterable and using only
174 Make an iterator that returns elements from the first iterable until it is
[all …]
/external/tensorflow/tensorflow/python/autograph/operators/
Dpy_builtins.py395 def filter_(function, iterable): argument
396 if isinstance(iterable, dataset_ops.DatasetV2):
397 return _tf_dataset_filter(function, iterable)
398 return _py_filter(function, iterable)
401 def _tf_dataset_filter(function, iterable): argument
402 return iterable.filter(function)
405 def _py_filter(function, iterable): argument
406 return filter(function, iterable)
409 def any_(iterable): argument
410 if isinstance(iterable, dataset_ops.DatasetV2):
[all …]
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javaparser_src/proper_source/com/github/javaparser/ast/stmt/
DForeachStmt.java36 private Expression iterable; field in ForeachStmt
44 final Expression iterable, final Statement body) { in ForeachStmt() argument
46 setIterable(iterable); in ForeachStmt()
52 final VariableDeclarationExpr var, final Expression iterable, in ForeachStmt() argument
56 setIterable(iterable); in ForeachStmt()
75 return iterable; in getIterable()
87 public void setIterable(final Expression iterable) { in setIterable() argument
88 this.iterable = iterable; in setIterable()
89 setAsParentNodeOf(this.iterable); in setIterable()
/external/python/cpython2/Doc/library/
Ditertools.rst54 :func:`groupby` iterable[, keyfunc] sub-iterators grouped by value of keyfunc(v)
94 Make an iterator that returns elements from the first iterable until it is
95 exhausted, then proceeds to the next iterable, until all of the iterables are
106 .. classmethod:: chain.from_iterable(iterable)
109 single iterable argument that is evaluated lazily. Roughly equivalent to::
120 .. function:: combinations(iterable, r)
122 Return *r* length subsequences of elements from the input *iterable*.
125 input *iterable* is sorted, the combination tuples will be produced
134 def combinations(iterable, r):
137 pool = tuple(iterable)
[all …]
/external/guava/guava-tests/test/com/google/common/collect/
DIterablesTest.java61 Iterable<String> iterable = Collections.emptySet(); in testSize0() local
62 assertEquals(0, Iterables.size(iterable)); in testSize0()
66 Iterable<String> iterable = Collections.singleton("a"); in testSize1Collection() local
67 assertEquals(1, Iterables.size(iterable)); in testSize1Collection()
71 Iterable<Integer> iterable = in testSize2NonCollection() local
78 assertEquals(2, Iterables.size(iterable)); in testSize2NonCollection()
94 private static Iterable<String> iterable(String... elements) { in iterable() method in IterablesTest
115 Iterable<String> set = iterable("a", null, "b");
120 Iterable<String> set = iterable("a", "b");
135 Iterable<String> set = iterable("a", null, "b");
[all …]
DFluentIterableTest.java85 FluentIterable<Integer> iterable = FluentIterable.from(asList(1)); in testFrom_alreadyFluentIterable() local
86 assertSame(iterable, FluentIterable.from(iterable)); in testFrom_alreadyFluentIterable()
148 Iterable<Integer> iterable = asList(1, 2, 3); in testConcatPeformingFiniteCycle() local
150 FluentIterable<Integer> repeated = FluentIterable.concat(Collections.nCopies(n, iterable)); in testConcatPeformingFiniteCycle()
204 Iterable<Integer> iterable = in testSize2NonCollection() local
211 assertEquals(2, FluentIterable.from(iterable).size()); in testSize2NonCollection()
237 Iterable<String> iterable = iterable("a", null, "b"); in testContains_nullIterableYes() local
238 assertTrue(FluentIterable.from(iterable).contains(null)); in testContains_nullIterableYes()
242 Iterable<String> iterable = iterable("a", "b"); in testContains_nullIterableNo() local
243 assertFalse(FluentIterable.from(iterable).contains(null)); in testContains_nullIterableNo()
[all …]
/external/mockito/src/test/java/org/mockitousage/bugs/
DInheritedGenericsPolimorphicCallTest.java36 MyIterable<String> iterable = Mockito.mock(MyIterable.class); field in InheritedGenericsPolimorphicCallTest
40 Mockito.when(iterable.iterator()).thenReturn(myIterator); in shouldStubbingWork()
41 assertNotNull(((Iterable<String>) iterable).iterator()); in shouldStubbingWork()
42 assertNotNull(iterable.iterator()); in shouldStubbingWork()
47 iterable.iterator(); in shouldVerificationWorks()
49 verify(iterable).iterator(); in shouldVerificationWorks()
50 verify((Iterable<String>) iterable).iterator(); in shouldVerificationWorks()
63 iterable = (MyIterable<String>) Proxy.newProxyInstance( in shouldWorkExactlyAsJavaProxyWould()
69 iterable.iterator(); in shouldWorkExactlyAsJavaProxyWould()
70 ((Iterable<String>) iterable).iterator(); in shouldWorkExactlyAsJavaProxyWould()
/external/guava/android/guava-tests/test/com/google/common/collect/
DIterablesTest.java61 Iterable<String> iterable = Collections.emptySet(); in testSize0() local
62 assertEquals(0, Iterables.size(iterable)); in testSize0()
66 Iterable<String> iterable = Collections.singleton("a"); in testSize1Collection() local
67 assertEquals(1, Iterables.size(iterable)); in testSize1Collection()
71 Iterable<Integer> iterable = in testSize2NonCollection() local
78 assertEquals(2, Iterables.size(iterable)); in testSize2NonCollection()
94 private static Iterable<String> iterable(String... elements) { in iterable() method in IterablesTest
115 Iterable<String> set = iterable("a", null, "b");
120 Iterable<String> set = iterable("a", "b");
135 Iterable<String> set = iterable("a", null, "b");
[all …]
DFluentIterableTest.java81 FluentIterable<Integer> iterable = FluentIterable.from(asList(1)); in testFrom_alreadyFluentIterable() local
82 assertSame(iterable, FluentIterable.from(iterable)); in testFrom_alreadyFluentIterable()
144 Iterable<Integer> iterable = asList(1, 2, 3); in testConcatPeformingFiniteCycle() local
146 FluentIterable<Integer> repeated = FluentIterable.concat(Collections.nCopies(n, iterable)); in testConcatPeformingFiniteCycle()
200 Iterable<Integer> iterable = in testSize2NonCollection() local
207 assertEquals(2, FluentIterable.from(iterable).size()); in testSize2NonCollection()
233 Iterable<String> iterable = iterable("a", null, "b"); in testContains_nullIterableYes() local
234 assertTrue(FluentIterable.from(iterable).contains(null)); in testContains_nullIterableYes()
238 Iterable<String> iterable = iterable("a", "b"); in testContains_nullIterableNo() local
239 assertFalse(FluentIterable.from(iterable).contains(null)); in testContains_nullIterableNo()
[all …]
/external/python/cpython3/Modules/clinic/
Ditertoolsmodule.c.h125 itertools__tee_impl(PyTypeObject *type, PyObject *iterable);
131 PyObject *iterable; in itertools__tee() local
140 iterable = PyTuple_GET_ITEM(args, 0); in itertools__tee()
141 return_value = itertools__tee_impl(type, iterable); in itertools__tee()
157 itertools_tee_impl(PyObject *module, PyObject *iterable, Py_ssize_t n);
163 PyObject *iterable; in itertools_tee() local
169 iterable = args[0]; in itertools_tee()
191 return_value = itertools_tee_impl(module, iterable, n); in itertools_tee()
204 itertools_cycle_impl(PyTypeObject *type, PyObject *iterable);
210 PyObject *iterable; in itertools_cycle() local
[all …]
/external/python/cpython2/Lib/
Dheapq.py203 def nlargest(n, iterable): argument
210 it = iter(iterable)
221 def nsmallest(n, iterable): argument
228 it = iter(iterable)
399 def nsmallest(n, iterable, key=None): argument
406 it = iter(iterable)
416 size = len(iterable)
421 return sorted(iterable, key=key)[:n]
425 it = izip(iterable, count()) # decorate
430 in1, in2 = tee(iterable)
[all …]
Dsets.py341 def _update(self, iterable): argument
346 if isinstance(iterable, BaseSet):
347 data.update(iterable._data)
352 if type(iterable) in (list, tuple, xrange):
355 it = iter(iterable)
368 for element in iterable:
385 def __init__(self, iterable=None): argument
389 if iterable is not None:
390 self._update(iterable)
410 def __init__(self, iterable=None): argument
[all …]
/external/cldr/tools/java/org/unicode/cldr/util/
DTransformer.java25 …> Transformer<S, V> iterator(Transform<S, ? extends V> transform, Iterable<? extends S> iterable) { in iterator() argument
26 return new Transformer<S, V>(transform, iterable.iterator()); in iterator()
33 …public static <S, V> With<V> iterable(Transform<S, ? extends V> transform, Iterator<? extends S> i… in iterable() method in Transformer
37 …public static <S, V> With<V> iterable(Transform<S, ? extends V> transform, Iterable<? extends S> i… in iterable() method in Transformer
38 return With.in(new Transformer<S, V>(transform, iterable.iterator())); in iterable()
41 public static <S, V> With<V> iterable(Transform<S, ? extends V> transform, S... items) { in iterable() method in Transformer
/external/javaparser/javaparser-symbol-solver-testing/src/test/test_sourcecode/javaparser_src/expected_output/
Dcom_github_javaparser_ast_stmt_ForeachStmt.txt8 Line 46) setIterable(iterable) ==> void
15 Line 56) setIterable(iterable) ==> void
20 Line 75) iterable ==> com.github.javaparser.ast.expr.Expression
24 Line 88) this.iterable = iterable ==> com.github.javaparser.ast.expr.Expression
25 Line 89) setAsParentNodeOf(this.iterable) ==> void
/external/libchrome/third_party/jinja2/
Dasyncsupport.py181 async def auto_aiter(iterable): argument
182 if hasattr(iterable, '__aiter__'):
183 async for item in iterable:
186 for item in iterable:
233 async def make_async_loop_context(iterable, undefined, recurse=None, depth0=0): argument
243 length = len(iterable)
245 if not hasattr(iterable, '__aiter__'):
246 iterable = tuple(iterable)
247 length = len(iterable)
250 async_iterator = auto_aiter(iterable)

12345678910>>...18