net.sf.okapi.lib.xliff2.core

## Class CloneFactory

- java.lang.Object
- - net.sf.okapi.lib.xliff2.core.CloneFactory

-     public class CloneFactory
      extends java.lang.Object

  Provides methods to create deep-copy clones of various abstract classes or interfaces.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CloneFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IExtChild` | `create(IExtChild original)` Creates a deep-copy clone of a given `IExtChild` object.
    `static java.lang.Object` | `create(java.lang.Object original)` Creates a deep-copy clone of a given object.
    `static Part` | `create(Part original)` Creates a deep-copy clone of a given `Part`/`Segment` object.
    `static Tag` | `create(Tag original, Tags destinationTags)` Creates a deep-copy clone of a given `Tag` object.

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

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

- - ### Constructor Detail

    - #### CloneFactory

          public CloneFactory()

  - ### Method Detail

    - #### create

          public static Tag create(Tag original,
                   Tags destinationTags)

      Creates a deep-copy clone of a given `Tag` object.
      Parameters:
        `original` - the original tag to duplicate.
        `destinationTags` - the list of destination tags. This is used to find and connect opening tags when creating closing tags.
      Returns:
        the new tag.

    - #### create

          public static Part create(Part original)

      Creates a deep-copy clone of a given `Part`/`Segment` object.
      Parameters:
        `original` - the original part/segment to duplicate.
      Returns:
        the new part/segment.

    - #### create

          public static IExtChild create(IExtChild original)

      Creates a deep-copy clone of a given `IExtChild` object.
      Parameters:
        `original` - the original object to duplicate.
      Returns:
        the new object.

    - #### create

          public static java.lang.Object create(java.lang.Object original)

      Creates a deep-copy clone of a given object.
      Parameters:
        `original` - the original object to duplicate.
      Returns:
        the new object.