public class IndentLevel extends Object
Constructor and Description |
---|
IndentLevel(IndentLevel base,
int... offsets)
Creates new instance for nested structure.
|
IndentLevel(int indent)
Creates new instance with one acceptable indentation level.
|
Modifier and Type | Method and Description |
---|---|
void |
addAcceptedIndent(IndentLevel indent)
Adds one more acceptable indentation level.
|
void |
addAcceptedIndent(int indent)
Adds one more acceptable indentation level.
|
int |
getFirstIndentLevel()
Returns first indentation level.
|
int |
getLastIndentLevel()
Returns last indentation level.
|
boolean |
isAcceptable(int indent)
Checks if given indentation is acceptable.
|
boolean |
isGreaterThan(int indent)
Returns true if indent less then minimal of
acceptable indentation levels, false otherwise.
|
boolean |
isMultiLevel()
Checks whether we have more than one level.
|
String |
toString() |
public IndentLevel(int indent)
indent
- acceptable indentation level.public IndentLevel(IndentLevel base, int... offsets)
base
- parent's leveloffsets
- offsets from parent's level.public final boolean isMultiLevel()
public boolean isAcceptable(int indent)
indent
- indentation to check.public boolean isGreaterThan(int indent)
indent
- indentation to check.indent
less then minimal of
acceptable indentation levels, false otherwise.public void addAcceptedIndent(int indent)
indent
- new acceptable indentation.public void addAcceptedIndent(IndentLevel indent)
indent
- new acceptable indentation.public int getFirstIndentLevel()
public int getLastIndentLevel()
Copyright © 2001–2018. All rights reserved.