Interface IntegerSequence

All Known Implementing Classes:
IntegerSequence.Combined, IntegerSequence.Explicit, IntegerSequence.For, IntegerSequence.Range

public interface IntegerSequence
Interface for an ordered sequence of integer values
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    This is a sequence of sequences
    static class 
    An array of integers which was explicitly specified
    static class 
    A sequence of integers which has been specified using a start number, end number, and step size.
    static class 
    A sequence of integers which has been specified using a start number, end number, and step size and uses the known upper limit of the array to bound it Examples: : 2: 2:3:
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    void
    initialize(int maxIndex)
    Specifies the maximum index of the array.
    int
     
    int
     
    boolean
     
  • Method Details

    • length

      int length()
    • initialize

      void initialize(int maxIndex)
      Specifies the maximum index of the array. If the maximum index is not known then a value < 0 is passed in and an exception should be thrown if this information is required NOTE: This is length - 1
      Parameters:
      maxIndex - Largest possible value in the sequence. or < 0 if unknown
    • next

      int next()
    • hasNext

      boolean hasNext()
    • getType

    • requiresMaxIndex

      boolean requiresMaxIndex()