A Ceylon Iterable that adapts an instance of Java's JIterable, allowing its elements to be iterated using a for loop.

IntArray ints = ... ;
for (int in CeylonIterable(Arrays.asList(*ints.array))) {
    ...
}

If the given iterable contains null elements, an optional Element type must be explicitly specified, for example:

CeylonIterable<String?>(javaStringStream)

If a non-optional Element type is specified, an AssertionError will occur whenever a null value is encountered while iterating the stream.

Note: Since Ceylon 1.2.1 it is possible to use JIterable directly in a Ceylon for statement:

JavaIterable<Foo> iterable = ... ;
for (foo in iterable) {
    ...
}

no subtypes hierarchy

Initializer
CeylonIterable(JIterable<out Element> iterable)
Inherited Attributes
Attributes inherited from: Object
Attributes inherited from: Iterable<Element,Absent>
Methods
iteratorSource Codeshared actual Iterator<Element> iterator()

An iterator for the elements belonging to this stream.

If this is a nonempty stream with type {Element+}, the iterator must produce at least one element.

Inherited Methods
Methods inherited from: Object
Methods inherited from: Category<Element>
Methods inherited from: Iterable<Element,Absent>