Java Utililty Methods Array to Iterable

List of utility methods to do Array to Iterable

Description

The list of methods to do Array to Iterable are organized into topic(s).

Method

IterabletoIterable(final boolean[] values)
Converts an array of boolean values into an Iterable of Boolean objects.
return new Iterable<Boolean>() {
    @Override
    public Iterator<Boolean> iterator() {
        return new Iterator<Boolean>() {
            private int pos = 0;
            @Override
            public boolean hasNext() {
                return pos < values.length;
...
IterabletoIterable(final T[] arr)
to Iterable
return new Iterable<T>() {
    @Override
    public Iterator<T> iterator() {
        return new Iterator<T>() {
            int index = 0;
            @Override
            public boolean hasNext() {
                return index < arr.length;
...
IterabletoIterable(final T[] array)
to Iterable
return new Iterable<T>() {
    @Override
    public Iterator<T> iterator() {
        return new Iterator<T>() {
            private int i;
            @Override
            public boolean hasNext() {
                return i < array.length;
...