com.puppycrawl.tools.checkstyle.checks.indentation
Class IndentLevel
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.indentation.IndentLevel
public class IndentLevel
extends java.lang.Object
Encapsulates representation of notion of expected indentation levels.
Provide a way to have multiple accaptable levels.
- o_sukhodolsky
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.
toString
public String toString()
- string representation of the object.