Module openj9.dtfj

Interface LongEnumeration

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 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 Details

    • nextLong

      long nextLong()
      Returns the next long value.
    • hasNumberOfElements

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

      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.