public class Rule extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
after
Pattern for after the break point.
|
protected String |
before
Pattern for before the break point.
|
protected String |
comment
Optional comment placed just before the rule.
|
protected boolean |
isActive
Flag indicating if the rule is active.
|
protected boolean |
isBreak
Flag indicating if the rule is a breaking rule.
|
| Constructor and Description |
|---|
Rule()
Creates an empty breaking and active Rule object.
|
Rule(String before,
String after,
boolean isBreak)
Creates a Rule object with given patterns and a flag indicating if the rule
is a breaking one or a breaking exception.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAfter()
Gets the pattern after the break point for this rule.
|
String |
getBefore()
Gets the pattern before the break point for this rule.
|
String |
getComment()
Gets the optional comment for this rule.
|
boolean |
isActive()
Indicates if this rule is active.
|
boolean |
isBreak()
Indicates if this rule is a breaking rule.
|
void |
setActive(boolean value)
Sets the flag indicating if this rule is active.
|
void |
setAfter(String value)
Sets the pattern after the break point for this rule.
|
void |
setBefore(String value)
Sets the pattern before the break point for this rule.
|
void |
setBreak(boolean value)
Sets the flag indicating if this rule is a breaking rule.
|
void |
setComment(String text)
Sets the comment for this rule.
|
protected String before
protected String after
protected boolean isBreak
protected boolean isActive
protected String comment
public Rule()
public Rule(String before, String after, boolean isBreak)
before - the pattern for before the break point.after - the pattern for after the break point.isBreak - true if the rule is a breaking rule, false if it is a
breaking exception.public String getBefore()
public void setBefore(String value)
value - the new pattern before the break point for this rule.public String getAfter()
public void setAfter(String value)
value - the new pattern after the break point for this rule.public boolean isBreak()
public void setBreak(boolean value)
value - true if this rule is a breaking rule, false if it is a
breaking exception.public boolean isActive()
public void setActive(boolean value)
value - true if this rule is active, false otherwise.public String getComment()
public void setComment(String text)
text - the new comment. Use null or empty string to remove the comment.Copyright © 2022. All rights reserved.