com.puppycrawl.tools.checkstyle.checks.indentation
Class IndentLevel
Encapsulates representation of notion of expected indentation levels.
Provide a way to have multiple accaptable levels.
IndentLevel(IndentLevel aBase, int aOffset) - Creates new instance for nested structure.
|
IndentLevel(int aIndent) - Creates new instance with one accaptable indentation level.
|
IndentLevel
public IndentLevel(IndentLevel aBase,
int aOffset)
Creates new instance for nested structure.
aBase
- parent's levelaOffset
- offset from parent's level.
IndentLevel
public IndentLevel(int aIndent)
Creates new instance with one accaptable indentation level.
aIndent
- accaptable indentation level.
accept
public boolean accept(int aIndent)
Checks if given indentation is accaptable.
aIndent
- indentation to check.
- true if givent indentation is acceptable,
false otherwise.
addAcceptedIndent
public void addAcceptedIndent(IndentLevel aIndent)
Adds one more acceptable indentation level.
aIndent
- new acceptable indentation.
addAcceptedIndent
public void addAcceptedIndent(int aIndent)
Adds one more acceptable indentation level.
aIndent
- new acceptable indentation.
gt
public boolean gt(int aIndent)
aIndent
- indentation to check.
- true if
aIndent
less then minimal of
accaptable indentation levels, false otherwise.
isMultiLevel
public final boolean isMultiLevel()
Checks wether we have more than one level.
- wether we have more than one level.
toString
public String toString()
- string representation of the object.