net.sf.okapi.common.resource

## Class TextFragmentUtil

- java.lang.Object
- - net.sf.okapi.common.resource.TextFragmentUtil

-     public final class TextFragmentUtil
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TextFragmentUtil()`

  - ### Method Summary

    Methods
    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 oradded codes in the target as compared to the source.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TextFragmentUtil

          public TextFragmentUtil()

  - ### Method Detail

    - #### catalogCodeAnomalies

          public static CodeAnomalies catalogCodeAnomalies(TextFragment source,
                                           TextFragment target)

      Store the missing, added or modified codes in the target as compared to the source.

      To assure consistent ids and code data run `TextFragment.alignCodeIds(TextFragment)` first.

      Parameters:
        `source` - - source `TextFragment`, use as the standard to compare against.
        `target` - - target `TextFragment` to compare codes with source.
      Returns:
        `CodeAnomalies` or null if no anomalies.

    - #### catalogCodeAnomalies

          public static CodeAnomalies catalogCodeAnomalies(TextFragment source,
                                           TextFragment target,
                                           boolean includeDeletable)

      Store the missing oradded codes in the target as compared to the source.

      To assure consistent ids and code data run `TextFragment.alignCodeIds(TextFragment)` first.

      Parameters:
        `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.
      Returns:
        `CodeAnomalies` or null if no anomalies.