tyrex.util
Class ArrayEnumeration
java.lang.Object
|
+--tyrex.util.ArrayEnumeration
- All Implemented Interfaces:
- java.util.Enumeration
- public final class ArrayEnumeration
- extends java.lang.Object
- implements java.util.Enumeration
This class provides a way to enumerate over an array.
The array is not cloned.
- Author:
- Riad Mohammed
Constructor Summary |
ArrayEnumeration(java.lang.Object[] array)
Create the ArrayEnumeration with the specified array |
ArrayEnumeration(java.lang.Object[] array,
int start,
int end)
Create the ArrayEnumeration with the specified arguments. |
Method Summary |
boolean |
hasMoreElements()
Return true if the enumeration has more elements to return. |
java.lang.Object |
nextElement()
Return the next element in the enumeration. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArrayEnumeration
public ArrayEnumeration(java.lang.Object[] array)
- Create the ArrayEnumeration with the specified array
- Parameters:
array
- the array to enumerate over
ArrayEnumeration
public ArrayEnumeration(java.lang.Object[] array,
int start,
int end)
- Create the ArrayEnumeration with the specified arguments.
- Parameters:
array
- the array to enumerate overstart
- the start index inclusiveend
- the end index exclusive
hasMoreElements
public boolean hasMoreElements()
- Return true if the enumeration has more elements to return.
- Specified by:
hasMoreElements
in interface java.util.Enumeration
- Returns:
- true if the enumeration has more elements to return.
nextElement
public java.lang.Object nextElement()
- Return the next element in the enumeration.
- Specified by:
nextElement
in interface java.util.Enumeration
- Returns:
- the next element in the enumeration.
- Throws:
java.util.NoSuchElementException
- if there are no more
elements.
Intalio Inc. (C) 1999-2001. All rights reserved.