Removed elements.
The Removed elements are ideally consecutive for the methods in this class to work correctly.
This class consists of methods that calculate information to better handle the difference application for the
containing Removed elements.
Iterable
| Modifier and Type | Field and Description |
|---|---|
| private final Integer | |
| private final Function | |
| private final Function | |
| private final Function | |
| private final Function | |
| private boolean | |
| private final List |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final Removed | Returns: the first element of this RemovedGroupReturns the first element of this RemovedGroup |
| pack-priv final Optional | Returns: the indentation in front of this RemovedGroup or Optional.empty()Returns the indentation in front of this RemovedGroup if possible. |
| private List | |
| pack-priv final Removed | Returns: the last element of this RemovedGroupReturns the last element of this RemovedGroup |
| pack-priv final Integer | Returns: the last difference incex of this RemovedGroupReturns the difference index of the last element being removed with this RemovedGroup |
| private boolean | |
| private boolean | |
| pack-priv final boolean | Returns: true if the RemovedGroup equates to a complete lineReturns true if the RemovedGroup equates to a complete line This is the case if there are only spaces and tabs left on the line besides the Removed elements. |
| pack-priv final boolean | Returns: wheter the RemovedGroup was already processedReturns whether the RemovedGroup was already processed and should not be processed again |
| public final Iterator | |
| public static RemovedGroup | |
| pack-priv final void | processed()
Marks the RemovedGroup as processed which indicates that it should not be processed again |
| firstElementIndex | back to summary |
|---|---|
| private final Integer firstElementIndex | |
| hasOnlyWhitespaceBehindFunction | back to summary |
|---|---|
| private final Function<TokenRange, Boolean> hasOnlyWhitespaceBehindFunction | |
| hasOnlyWhitespaceInFrontFunction | back to summary |
|---|---|
| private final Function<TokenRange, Boolean> hasOnlyWhitespaceInFrontFunction | |
| hasOnlyWhitespaceJavaTokenBehindFunction | back to summary |
|---|---|
| private final Function<JavaToken, Boolean> hasOnlyWhitespaceJavaTokenBehindFunction | |
| hasOnlyWhitespaceJavaTokenInFrontFunction | back to summary |
|---|---|
| private final Function<JavaToken, Boolean> hasOnlyWhitespaceJavaTokenInFrontFunction | |
| isProcessed | back to summary |
|---|---|
| private boolean isProcessed | |
| removedList | back to summary |
|---|---|
| private final List<Removed> removedList | |
| RemovedGroup | back to summary |
|---|---|
| private RemovedGroup(Integer firstElementIndex, List<Removed> removedList) | |
| getFirstElement | back to summary |
|---|---|
| pack-priv final Removed getFirstElement() Returns the first element of this RemovedGroup
| |
| getIndentation | back to summary |
|---|---|
| pack-priv final Optional Returns the indentation in front of this RemovedGroup if possible. If there is something else than whitespace in front, Optional.empty() is returned. | |
| getIndicesBeingRemoved | back to summary |
|---|---|
| private List | |
| getLastElement | back to summary |
|---|---|
| pack-priv final Removed getLastElement() Returns the last element of this RemovedGroup
| |
| getLastElementIndex | back to summary |
|---|---|
| pack-priv final Integer getLastElementIndex() Returns the difference index of the last element being removed with this RemovedGroup
| |
| hasOnlyWhitespace | back to summary |
|---|---|
| private boolean hasOnlyWhitespace(Removed startElement, Function<TokenRange, Boolean> hasOnlyWhitespaceFunction) | |
| hasOnlyWhiteSpaceForTokenFunction | back to summary |
|---|---|
| private boolean hasOnlyWhiteSpaceForTokenFunction(JavaToken token, Function<JavaToken, Optional<JavaToken>> tokenFunction) | |
| isACompleteLine | back to summary |
|---|---|
| pack-priv final boolean isACompleteLine() Returns true if the RemovedGroup equates to a complete line
This is the case if there are only spaces and tabs left on the line besides the Removed elements.
" [Removed] [EOL]" -> this would be a complete line, regardless of spaces or tabs before or after the [Removed] element " [Removed] void [EOL]" -> this would not be a complete line because of the "void" " public [Removed] [EOL]" -> this would not be a complete line because of the "public"
| |
| isProcessed | back to summary |
|---|---|
| pack-priv final boolean isProcessed() Returns whether the RemovedGroup was already processed and should not be processed again
| |
| iterator | back to summary |
|---|---|
| public final Iterator Implements java. Doc from java. Returns an iterator over elements of type | |
| of | back to summary |
|---|---|
| public static RemovedGroup of(Integer firstElementIndex, List<Removed> removedList) Factory method to create a RemovedGroup which consists of consecutive Removed elements
| |
| processed | back to summary |
|---|---|
| pack-priv final void processed() Marks the RemovedGroup as processed which indicates that it should not be processed again | |