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 |
|---|---|
static IndentLevel |
addAcceptable(IndentLevel base,
IndentLevel addition)
Combines 2 acceptable indentation level classes.
|
static IndentLevel |
addAcceptable(IndentLevel base,
int... additions)
Adds one or 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 than 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 than minimal of
acceptable indentation levels, false otherwise.public static IndentLevel addAcceptable(IndentLevel base, int... additions)
base - class to add new indentations to.additions - new acceptable indentation.public static IndentLevel addAcceptable(IndentLevel base, IndentLevel addition)
base - class to add new indentations to.addition - new acceptable indentation.public int getFirstIndentLevel()
public int getLastIndentLevel()
Copyright © 2001–2020. All rights reserved.