tyrex.util
Class ArrayEnumeration

java.lang.Object
  extended bytyrex.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
 

Constructor Detail

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 over
start - the start index inclusive
end - the end index exclusive
Method Detail

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.


Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.