net.sf.okapi.common.resource

## Enum IAlignedSegments.VariantOptions

- java.lang.Object
- - java.lang.Enum<IAlignedSegments.VariantOptions>
  - - net.sf.okapi.common.resource.IAlignedSegments.VariantOptions

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<IAlignedSegments.VariantOptions>
  Enclosing interface:
    IAlignedSegments

      public static enum IAlignedSegments.VariantOptions
      extends java.lang.Enum<IAlignedSegments.VariantOptions>

  Flag used to determine the containers that will have segments modified by an operation.

  VariantOptions in conjunction with a `LocaleId`, represents directions to a method on which of 5 different categories of `TextContainer`s in the parent `ITextUnit` should be modified:

  MODIFY_SOURCE
    modify the source used by the specified target locale
  MODIFY_TARGET
    modify the target for the specified locale
  MODIFY_TARGETS_WITH_SAME_SOURCE
    modify other targets that also use the source of the target locale
  MODIFY_VARIANT_SOURCES
    modify sources other than the one for the target locale
  MODIFY_TARGETS_OF_VARIANT_SOURCES
    modify targets that do not use the source for the target locale
  VariantOptions also defines 2 flags:
  CANCEL_IF_MULTIPLE_TARGETS
    indicates that the method should not proceed if there are any targets in the TARGETS_WITH_SAME_SOURCE category
  CREATE_VARIANT_IF_MULTIPLE_TARGETS
    indicates that if there are any targets in the TARGETS_WITH_SAME_SOURCE category, a new variant source should be used rather than apply changes to the shared source
  See Also:
    `IAlignedSegments.CopyOptions`

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CANCEL_IF_MULTIPLE_TARGETS`
    `CREATE_VARIANT_IF_MULTIPLE_TARGETS`
    `MODIFY_SOURCE`
    `MODIFY_TARGET`
    `MODIFY_TARGETS_OF_VARIANT_SOURCES`
    `MODIFY_TARGETS_WITH_SAME_SOURCE`
    `MODIFY_VARIANT_SOURCES`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IAlignedSegments.VariantOptions` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
    `static IAlignedSegments.VariantOptions[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### CREATE_VARIANT_IF_MULTIPLE_TARGETS

          public static final IAlignedSegments.VariantOptions CREATE_VARIANT_IF_MULTIPLE_TARGETS

    - #### CANCEL_IF_MULTIPLE_TARGETS

          public static final IAlignedSegments.VariantOptions CANCEL_IF_MULTIPLE_TARGETS

    - #### MODIFY_SOURCE

          public static final IAlignedSegments.VariantOptions MODIFY_SOURCE

    - #### MODIFY_TARGET

          public static final IAlignedSegments.VariantOptions MODIFY_TARGET

    - #### MODIFY_TARGETS_WITH_SAME_SOURCE

          public static final IAlignedSegments.VariantOptions MODIFY_TARGETS_WITH_SAME_SOURCE

    - #### MODIFY_VARIANT_SOURCES

          public static final IAlignedSegments.VariantOptions MODIFY_VARIANT_SOURCES

    - #### MODIFY_TARGETS_OF_VARIANT_SOURCES

          public static final IAlignedSegments.VariantOptions MODIFY_TARGETS_OF_VARIANT_SOURCES

  - ### Method Detail

    - #### values

          public static IAlignedSegments.VariantOptions[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (IAlignedSegments.VariantOptions c : IAlignedSegments.VariantOptions.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static IAlignedSegments.VariantOptions valueOf(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null