Class VariableTime

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

public class VariableTime extends Object
Container for objects from the opening_hours specification
  • Constructor Details

    • VariableTime

      public VariableTime()
      Default constructor
    • VariableTime

      public VariableTime(@NotNull @NotNull VariableTime vt)
      Construct a new VariableTime with the same contents
      Parameters:
      vt - the original VariableTime
  • Method Details

    • toString

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

      public boolean equals(Object other)
    • hashCode

      public int hashCode()
    • getEvent

      public Event getEvent()
      Returns:
      the event
    • getOffset

      public int getOffset()
      Returns:
      the offset
    • setEvent

      public void setEvent(Event event)
      Set the day the range starts on
      Parameters:
      event - the event to set
    • setEvent

      public void setEvent(String event)
      Set the day the range starts on
      Parameters:
      event - the event to set
    • setOffset

      public void setOffset(int offset)
      Parameters:
      offset - the offset to set
    • copy

      public VariableTime 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