Package iota

Class NRange

java.lang.Object
iota.NRange

class NRange extends Object
Representation of a range within an interval.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
    Start position of the range.
    int
    End position of the range.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NRange(int start, int stop)
    Constructs an NRange given its start and stop positions.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if this range intersects the other range, and false otherwise.
    Returns a string representation of this range.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • start

      public int start
      Start position of the range.
    • stop

      public int stop
      End position of the range.
  • Constructor Details

    • NRange

      public NRange(int start, int stop)
      Constructs an NRange given its start and stop positions.
      Parameters:
      start - start position.
      stop - stop position.
  • Method Details

    • intersects

      public boolean intersects(NRange other)
      Returns true if this range intersects the other range, and false otherwise.
      Parameters:
      other - the other range.
      Returns:
      true if this range intersects the other range, and false otherwise.
    • toString

      public String toString()
      Returns a string representation of this range.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this range.