net.sf.okapi.common.resource

## Class AlignedPair

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

-     public final class AlignedPair
      extends java.lang.Object

  An aligned pair consists of a source and target list of `TextPart`s or `Segment`s, along with a `LocaleId` specifying the locale of the target.

  An AlignedPair is read-only.

  Author:
    HARGRAVEJE

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AlignedPair(java.util.List<TextPart> sourceParts, java.util.List<TextPart> targetParts, LocaleId localeId)` Creates an AlignedPair from source and target `TextPart`s
    `AlignedPair(Segment sourceSegment, Segment targetSegment, LocaleId localeId)` Creates an AlignedPair from source and target `Segment`s

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `LocaleId` | `getLocaleId()` Gets the `LocaleId` of the target parts
    `java.util.List<TextPart>` | `getSourceParts()` Gets the source `TextPart`s
    `java.util.List<TextPart>` | `getTargetParts()` Gets the target `TextPart`s

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

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

- - ### Constructor Detail

    - #### AlignedPair

          public AlignedPair(java.util.List<TextPart> sourceParts,
                     java.util.List<TextPart> targetParts,
                     LocaleId localeId)

      Creates an AlignedPair from source and target `TextPart`s
      Parameters:
        `sourceParts` - List source inter-segment and segment parts
        `targetParts` - List target inter-segment and segment parts
        `localeId` - `LocaleId` of the target parts

    - #### AlignedPair

          public AlignedPair(Segment sourceSegment,
                     Segment targetSegment,
                     LocaleId localeId)

      Creates an AlignedPair from source and target `Segment`s
      Parameters:
        `sourceSegment` - - the source `Segment`
        `targetSegment` - - the target `Segment`
        `localeId` - - `LocaleId` of the target `Segment`

  - ### Method Detail

    - #### getSourceParts

          public java.util.List<TextPart> getSourceParts()

      Gets the source `TextPart`s
      Returns:
        list of `TextPart`s

    - #### getTargetParts

          public java.util.List<TextPart> getTargetParts()

      Gets the target `TextPart`s
      Returns:
        list of `TextPart`s

    - #### getLocaleId

          public LocaleId getLocaleId()

      Gets the `LocaleId` of the target parts
      Returns:
        a `LocaleId`