|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.puppycrawl.tools.checkstyle.checks.indentation.IndentLevel
public class IndentLevel
Encapsulates representation of notion of expected indentation levels. Provide a way to have multiple accaptable levels.
Constructor Summary | |
---|---|
IndentLevel(IndentLevel aBase,
int aOffset)
Creates new instance for nested structure. |
|
IndentLevel(int aIndent)
Creates new instance with one accaptable indentation level. |
Method Summary | |
---|---|
boolean |
accept(int aIndent)
Checks if given indentation is accaptable. |
void |
addAcceptedIndent(IndentLevel aIndent)
Adds one more acceptable indentation level. |
void |
addAcceptedIndent(int aIndent)
Adds one more acceptable indentation level. |
boolean |
gt(int aIndent)
|
boolean |
isMultiLevel()
Checks wether we have more than one level. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IndentLevel(int aIndent)
aIndent
- accaptable indentation level.public IndentLevel(IndentLevel aBase, int aOffset)
aBase
- parent's levelaOffset
- offset from parent's level.Method Detail |
---|
public final boolean isMultiLevel()
public boolean accept(int aIndent)
aIndent
- indentation to check.
public boolean gt(int aIndent)
aIndent
- indentation to check.
aIndent
less then minimal of
accaptable indentation levels, false otherwise.public void addAcceptedIndent(int aIndent)
aIndent
- new acceptable indentation.public void addAcceptedIndent(IndentLevel aIndent)
aIndent
- new acceptable indentation.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |