T - the element type of the Iterable/Iteratorjava.io.Serializable, java.lang.Iterable<Enumerated<T>>public class Enumeration<T> extends java.lang.Object implements java.lang.Iterable<Enumerated<T>>, java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Iterator<T> |
m_Iterator |
the iterator to wrap.
|
protected int |
m_Start |
the starting index.
|
protected int |
m_Step |
the step size.
|
| Constructor | Description |
|---|---|
Enumeration(java.lang.Iterable<T> iterable) |
Initializes the wrapper.
|
Enumeration(java.lang.Iterable<T> iterable,
int start) |
Initializes the wrapper.
|
Enumeration(java.lang.Iterable<T> iterable,
int start,
int step) |
Initializes the wrapper.
|
Enumeration(java.util.Iterator<T> iterator) |
Initializes the wrapper.
|
Enumeration(java.util.Iterator<T> iterator,
int start) |
Initializes the wrapper.
|
Enumeration(java.util.Iterator<T> iterator,
int start,
int step) |
Initializes the wrapper.
|
Enumeration(T[] array) |
Initializes the wrapper.
|
Enumeration(T[] array,
int start) |
Initializes the wrapper.
|
Enumeration(T[] array,
int start,
int step) |
Initializes the wrapper.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.util.Iterator<Enumerated<T>> |
iterator() |
Returns the iterator.
|
java.lang.String |
toString() |
Returns a simple string representation of the wrapper.
|
protected java.util.Iterator<T> m_Iterator
protected int m_Start
protected int m_Step
public Enumeration(java.lang.Iterable<T> iterable)
iterable - the iterable to wrappublic Enumeration(java.lang.Iterable<T> iterable, int start)
iterable - the iterable to wrappublic Enumeration(java.lang.Iterable<T> iterable, int start, int step)
iterable - the iterable to wrappublic Enumeration(T[] array)
array - the array to wrappublic Enumeration(T[] array, int start)
array - the array to wrappublic Enumeration(T[] array, int start, int step)
array - the array to wrappublic Enumeration(java.util.Iterator<T> iterator)
iterator - the iterator to wrappublic Enumeration(java.util.Iterator<T> iterator, int start)
iterator - the iterator to wrappublic Enumeration(java.util.Iterator<T> iterator, int start, int step)
iterator - the iterator to wrappublic java.util.Iterator<Enumerated<T>> iterator()
iterator in interface java.lang.Iterable<T>public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.