public final class TextFragmentUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_INLINE_CODES |
| Constructor and Description |
|---|
TextFragmentUtil() |
| Modifier and Type | Method and Description |
|---|---|
static CodeAnomalies |
catalogCodeAnomalies(TextFragment source,
TextFragment target)
Store the missing, added or modified codes in the target as compared to
the source.
|
static CodeAnomalies |
catalogCodeAnomalies(TextFragment source,
TextFragment target,
boolean includeDeletable)
Store the missing or added codes in the target as compared to the source.
|
static boolean |
moreThanMaxCodes(TextFragment tf) |
static TextFragment |
removeMoreThanMaxCodes(TextFragment tf) |
static String |
toText(TextFragment tf)
Render the
TextFragment including all Codes. |
public static final int MAX_INLINE_CODES
public static CodeAnomalies catalogCodeAnomalies(TextFragment source, TextFragment target)
To assure consistent ids and code data run
TextFragment.alignCodeIds(TextFragment) first.
source - - source TextFragment, use as the standard to compare
against.target - - target TextFragment to compare codes with source.CodeAnomalies or null if no anomalies.public static CodeAnomalies catalogCodeAnomalies(TextFragment source, TextFragment target, boolean includeDeletable)
To assure consistent ids and code data run
TextFragment.alignCodeIds(TextFragment) first.
source - - source TextFragment, use as the standard to compare
against.target - - target TextFragment to compare codes with source.includeDeletable - - do we count deletable codes as missing? True by default.CodeAnomalies or null if no anomalies.public static boolean moreThanMaxCodes(TextFragment tf)
public static TextFragment removeMoreThanMaxCodes(TextFragment tf)
public static String toText(TextFragment tf)
TextFragment including all Codes.
differs from TextFragment.toText() by also using outerData.tf - The TextFragment to renderCopyright © 2021. All rights reserved.