- All Superinterfaces:
Enumeration
This interface provides an enumeration of long values. As well as the methods provided
by its superclass it also offers a
nextLong()
method to get the value as a primitive thus
avoiding the overhead of an object creation. In addition it provides an optional
numberOfElements()
method which returns the total number of elements in the enumeration.
If this optional method is supported then the provider will return true for the
hasNumberOfElements()
method.-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if this enumeration supports thenumberOfElements()
method.long
nextLong()
Returns the next long value.int
Returns the total number of elements in this enumeration (not the remaining number!).Methods declared in interface java.util.Enumeration
asIterator, hasMoreElements, nextElement
-
Method Details
-
nextLong
long nextLong()Returns the next long value. -
hasNumberOfElements
boolean hasNumberOfElements()Returns true if this enumeration supports thenumberOfElements()
method. -
numberOfElements
int numberOfElements()Returns the total number of elements in this enumeration (not the remaining number!). Users of this method should check thathasNumberOfElements()
returns true.
-