public class IndentLevel extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.util.BitSet |
levels
Set of acceptable indentation levels.
|
| Modifier | Constructor and Description |
|---|---|
private |
IndentLevel()
Creates new instance with no acceptable indentation level.
|
|
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.
|
java.lang.String |
toString() |
private final java.util.BitSet levels
public IndentLevel(int indent)
indent - acceptable indentation level.public IndentLevel(IndentLevel base, int... offsets)
base - parent's leveloffsets - offsets from parent's level.private IndentLevel()
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()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2001-2022. All Rights Reserved.