-
- All Superinterfaces:
Enumeration
public interface LongEnumeration extends Enumeration
This interface provides an enumeration of long values. As well as the methods provided by its superclass it also offers anextLong()
method to get the value as a primitive thus avoiding the overhead of an object creation. In addition it provides an optionalnumberOfElements()
method which returns the total number of elements in the enumeration. If this optional method is supported then the provider will return true for thehasNumberOfElements()
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasNumberOfElements()
Returns true if this enumeration supports thenumberOfElements()
method.long
nextLong()
Returns the next long value.int
numberOfElements()
Returns the total number of elements in this enumeration (not the remaining number!).-
Methods declared in interface java.util.Enumeration
asIterator, hasMoreElements, nextElement
-
-
-
-
Method Detail
-
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.
-
-