Package craterdog.core
Interface Sequential<E>
- Type Parameters:
E
- The type of element that makes up the sequence.
- All Superinterfaces:
Iterable<E>
This interface should be implemented by classes that define a sequence of
elements that can be iterated over in a sequential manner.
- Author:
- Derk Norton
-
Method Summary
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
createIterator
-
isEmpty
default boolean isEmpty()This method checks to see if the sequence is empty.- Returns:
- Whether or not the sequence is empty.
-
getSize
int getSize()This method returns the number of elements in the sequence.- Returns:
- The number of elements in the sequence.
-
toArray
E[] toArray()This method returns an array containing the elements in the sequence.- Returns:
- array An array containing the elements from the sequence.
-
iterator
-