Class ArrayIterable<E>

java.lang.Object
edu.uky.ai.util.ArrayIterable<E>
Type Parameters:
E - the kind of element in the array
All Implemented Interfaces:
java.lang.Iterable<E>

public class ArrayIterable<E>
extends java.lang.Object
implements java.lang.Iterable<E>
An object that allows an array to be treated as Iterable.
Author:
Stephen G. Ware
  • Constructor Summary

    Constructors 
    Constructor Description
    ArrayIterable​(E[] array)
    Constructs a new iterable for the given array.
  • Method Summary

    Modifier and Type Method Description
    java.util.Iterator<E> iterator()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • ArrayIterable

      public ArrayIterable​(E[] array)
      Constructs a new iterable for the given array.
      Parameters:
      array - the array
  • Method Details

    • iterator

      public java.util.Iterator<E> iterator()
      Specified by:
      iterator in interface java.lang.Iterable<E>