|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gishur.core.ArrayEnumeration
The ArrayEnumeration
enumerates arrays (of Objects
) via
the Enumeration
interface of java.util
.
Constructor Summary | |
ArrayEnumeration(java.lang.Object[] array)
Creates an ArrayEnumeration , that enumerates the given
array. |
|
ArrayEnumeration(java.lang.Object[] array,
int start,
int length)
Creates an ArrayEnumeration , that enumerates the given
sub-array. |
Method Summary | |
boolean |
hasMoreElements()
Tests if this enumeration contains more elements. |
java.lang.Object |
nextElement()
Returns the next element of this enumeration if this enumeration object has at least one more element to provide. |
java.lang.String |
toString()
Overrides java.lang.Object.toString() . |
static java.lang.String |
toString(java.lang.Object[] a)
Converts an array a to a string using commas "," to separate array elements. |
static java.lang.String |
toString(java.lang.Object[] a,
int start,
int len)
Converts a subarray starting at start with length len to a string using commas "," to separate array elements. |
static java.lang.String |
toString(java.lang.Object[] a,
int start,
int len,
java.lang.String separator)
Converts a subarray starting at start with length len to a string using the separation string separator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ArrayEnumeration(java.lang.Object[] array, int start, int length)
ArrayEnumeration
, that enumerates the given
sub-array. If the given length is less than 0
, the
array will be extended to the end.array
- the array to enumeratestart
- the start indexlength
- the subarray length (if <=0
, then to the end
of the array)NullPointerException
- if the array is null
.public ArrayEnumeration(java.lang.Object[] array)
ArrayEnumeration
, that enumerates the given
array.array
- the array to enumerateNullPointerException
- if the array is null
.Method Detail |
public java.lang.String toString()
java.lang.Object.toString()
.toString
in class java.lang.Object
Object.toString()
public static final java.lang.String toString(java.lang.Object[] a, int start, int len, java.lang.String separator)
a
- object arraystart
- start indexlen
- length of subarrayseparator
- separation string between elementspublic static final java.lang.String toString(java.lang.Object[] a, int start, int len)
a
- object arraypublic static final java.lang.String toString(java.lang.Object[] a)
a
- object arraypublic boolean hasMoreElements()
hasMoreElements
in interface java.util.Enumeration
true
if and only if this enumeration object
contains at least one more element to provide;
false
otherwise.public java.lang.Object nextElement()
nextElement
in interface java.util.Enumeration
java.util.NoSuchElementException
- if no more elements exist.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |