Skip to content

Class Range

Javadoc 27 generates this reference during each site build from the exported packages and the annotation processor. The Java guide shows the API in use.

public final class Range extends IntType
The integers from a lower bound up: lo... to(NumericExpr) and below(NumericExpr) give it an upper bound.
  • Method Details

    • to

      public IntType to(NumericExpr hi)
      Returns lo..hi, with both bounds included.
      Parameters:
      hi - the upper bound
      Returns:
      lo..hi, with both bounds included
      Throws:
      IllegalArgumentException - if the bound is a float
    • to

      public IntType to(long hi)
      Returns lo..hi, with both bounds included.
      Parameters:
      hi - the upper bound
      Returns:
      lo..hi, with both bounds included
    • below

      public IntType below(NumericExpr hi)
      Returns lo..<hi, without the upper bound.
      Parameters:
      hi - the upper bound
      Returns:
      lo..<hi, without the upper bound
      Throws:
      IllegalArgumentException - if the bound is a float
    • below

      public IntType below(long hi)
      Returns lo..<hi, without the upper bound.
      Parameters:
      hi - the upper bound
      Returns:
      lo..<hi, without the upper bound