Class RuleModifier

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

    public class RuleModifier
    extends java.lang.Object
    Container for objects from the opening_hours specification
    • Constructor Detail

      • 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 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()
      • getModifier

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

        @Nullable
        public @Nullable java.lang.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 java.lang.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 java.lang.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 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