Class IndentationCalculator.EnforcingContext
java.lang.Object
com.github.javaparser.printer.lexicalpreservation.IndentationCalculator.EnforcingContext
- Enclosing class:
IndentationCalculator
Context information for enforcing indentation.
Contains the starting position and the number of extra characters to remove.
This is an immutable value object returned by analyzeEnforcingContext.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EnforcingContext
public EnforcingContext(int startIndex, int extraCharacters)
-
-
Method Details
-
getStartIndex
public int getStartIndex()Returns the starting index of the whitespace sequence to potentially remove.- Returns:
- the start index
-
getExtraCharacters
public int getExtraCharacters()Returns the total number of extra whitespace characters found.- Returns:
- count of extra characters
-
hasExtraCharacters
public boolean hasExtraCharacters()Returns whether there are any extra characters to remove.- Returns:
- true if extraCharacters > 0
-
toString
-
equals
-
hashCode
-