Class Nth

java.lang.Object
ch.poole.openinghoursparser.Nth
All Implemented Interfaces:
Copy<ch.poole.openinghoursparser.Element>

public class Nth extends Object
Container for objects from the opening_hours specification
  • Field Details

  • Constructor Details

    • Nth

      public Nth()
      Default constructor
    • Nth

      public Nth(Nth n)
      Construct a new Nth with the same content
      Parameters:
      n - original Nth
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
    • hashCode

      public int hashCode()
    • getStartNth

      public int getStartNth()
      Returns:
      the startNth
    • getEndNth

      public int getEndNth()
      Returns:
      the endNth of Nth.INVALID_NTH if not set/not a range
    • setStartNth

      public void setStartNth(int startNth)
      Parameters:
      startNth - the startNth to set
    • setEndNth

      public void setEndNth(int endNth)
      Parameters:
      endNth - the endNth to set
    • copy

      public Nth copy()
      Description copied from interface: Copy
      Create a copy of the objecz
      Returns:
      a copy of the object
    • toDebugString

      public String toDebugString()
      Create a string that identifies which class created it for debugging and testing
      Returns:
      the output of toString with the class name prepended