de.caff.generics

## Interface Copyable<T>

- All Known Subinterfaces:
    MutableBooleanIndexable, MutableByteIndexable, MutableCharIndexable, MutableDoubleIndexable, MutableFloatIndexable, MutableIntIndexable, MutableLongIndexable, MutableShortIndexable
  All Known Implementing Classes:
    AbstractBasicCopyable, MutableBooleanIndexable.Base, MutableByteIndexable.Base, MutableCharIndexable.Base, MutableDoubleIndexable.Base, MutableFloatIndexable.Base, MutableIntIndexable.Base, MutableLongIndexable.Base, MutableShortIndexable.Base

      public interface Copyable<T>

  Enhanced cloning support.
  Author:
    Rammi

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <U extends Copyable<? extends U>> U` | `copy(U source)` Copy an copyable object while taking care of `null` values.
    `T` | `getCopy()` Get a copy of this object.

- - ### Method Detail

    - #### getCopy

          @NotNull
          T getCopy()

      Get a copy of this object. Immutable objects are allowed to return themselves. The copy needs not to be of the same class, it just has to fulfill the type restriction.
      Returns:
        independent copy of this object

    - #### copy

          @Nullable
          static <U extends Copyable<? extends U>> U copy(@Nullable
                                                                    U source)

      Copy an copyable object while taking care of `null` values.
      Type Parameters:
        `U` - source object type
      Parameters:
        `source` - source object, possibly `null`
      Returns:
        copy of source object, or `null` if `source` was `null`