Class RuleModifier

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

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

    • RuleModifier

      public RuleModifier()
      Default constructor
    • RuleModifier

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

    • toString

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

      public boolean equals(Object other)
    • hashCode

      public int hashCode()
    • getModifier

      @Nullable public @Nullable RuleModifier.Modifier getModifier()
      Returns:
      the modifier, null if not set
    • getComment

      @Nullable public @Nullable String getComment()
      Returns:
      the comment, null if not set
    • setModifier

      public void setModifier(@Nullable @Nullable RuleModifier.Modifier modifier)
      Set the rule modifier
      Parameters:
      modifier - the modifier to set
    • setModifier

      public void setModifier(@Nullable @Nullable String modifier)
      Set the rule modifier
      Parameters:
      modifier - the modifier to set, an empty string, or null will unset the modifier
    • setComment

      public void setComment(@Nullable @Nullable String comment)
      Parameters:
      comment - the comment to set
    • copy

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