com.ibm.jvm.ras.util
Interface LongEnumeration

All Superinterfaces:
java.util.Enumeration

public interface LongEnumeration
extends java.util.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
 boolean hasNumberOfElements()
          Returns true if this enumeration supports the numberOfElements() method.
 long nextLong()
          Returns the next long value.
 int numberOfElements()
          Returns the total number of elements in this enumeration (not the remaining number!).
 
Methods inherited from interface java.util.Enumeration
hasMoreElements, nextElement
 

Method Detail

nextLong

public long nextLong()
Returns the next long value.


hasNumberOfElements

public boolean hasNumberOfElements()
Returns true if this enumeration supports the numberOfElements() method.


numberOfElements

public int numberOfElements()
Returns the total number of elements in this enumeration (not the remaining number!). Users of this method should check that hasNumberOfElements() returns true.



© Copyright IBM Corp. 2007. All Rights Reserved.