Class RMShapeTable.Span

  • All Implemented Interfaces:
    java.lang.Comparable
    Direct Known Subclasses:
    RMShapeTable.Column, RMShapeTable.Row
    Enclosing class:
    RMShapeTable

    public static class RMShapeTable.Span
    extends java.lang.Object
    implements java.lang.Comparable
    A class to represent an interval
    • Constructor Summary

      Constructors 
      Constructor Description
      Span​(double aStart, double anEnd)
      Creates a new span.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(java.lang.Object aSpan)
      Comparable implementation.
      boolean contains​(double aValue)
      Returns whether given value is contained in the span (inclusive).
      double getLength()
      Returns the span length.
      boolean intersects​(RMShapeTable.Span aSpan)
      Returns whether given span intersects this span.
      java.lang.String toString()
      Returns string representation of span.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Span

        public Span​(double aStart,
                    double anEnd)
        Creates a new span.
    • Method Detail

      • getLength

        public double getLength()
        Returns the span length.
      • contains

        public boolean contains​(double aValue)
        Returns whether given value is contained in the span (inclusive).
      • intersects

        public boolean intersects​(RMShapeTable.Span aSpan)
        Returns whether given span intersects this span.
      • toString

        public java.lang.String toString()
        Returns string representation of span.
        Overrides:
        toString in class java.lang.Object
      • compareTo

        public int compareTo​(java.lang.Object aSpan)
        Comparable implementation.
        Specified by:
        compareTo in interface java.lang.Comparable