Package ch.poole.openinghoursparser
Class RuleModifier
- java.lang.Object
-
- ch.poole.openinghoursparser.RuleModifier
-
- All Implemented Interfaces:
Copy<ch.poole.openinghoursparser.Element>
public class RuleModifier extends java.lang.ObjectContainer for objects from the opening_hours specification
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRuleModifier.Modifier
-
Constructor Summary
Constructors Constructor Description RuleModifier()Default constructorRuleModifier(@NotNull RuleModifier rm)Construct a new RuleModifier with the same contents
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleModifiercopy()Create a copy of the objeczbooleanequals(java.lang.Object other)@Nullable java.lang.StringgetComment()@Nullable RuleModifier.ModifiergetModifier()inthashCode()voidsetComment(@Nullable java.lang.String comment)voidsetModifier(@Nullable RuleModifier.Modifier modifier)Set the rule modifiervoidsetModifier(@Nullable java.lang.String modifier)Set the rule modifierjava.lang.StringtoDebugString()Create a string that identifies which class created it for debugging and testingjava.lang.StringtoString()
-
-
-
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:
toStringin classjava.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:CopyCreate 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
-
-