Class Nth

  • All Implemented Interfaces:
    Copy<ch.poole.openinghoursparser.Element>

    public class Nth
    extends java.lang.Object
    Container for objects from the opening_hours specification
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int INVALID_NTH  
    • Constructor Summary

      Constructors 
      Constructor Description
      Nth()
      Default constructor
      Nth​(Nth n)
      Construct a new Nth with the same content
    • Constructor Detail

      • Nth

        public Nth()
        Default constructor
      • Nth

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

      • toString

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

        public boolean equals​(java.lang.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 java.lang.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