Interface Copier<T>

  • Type Parameters:
    T - the type of the copied object
    All Superinterfaces:
    BiConsumer<T,​T>
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @ParametersAreNonnullByDefault
    @FunctionalInterface
    public interface Copier<T>
    extends BiConsumer<T,​T>
    A specialized BiConsumer able to copy an object to another of the same type.
    See Also:
    BiConsumer
    • Method Detail

      • accept

        default void accept​(T source,
                            T target)
        Specified by:
        accept in interface BiConsumer<T,​T>
      • copy

        void copy​(T source,
                  T target)
        Copies all the contents from the source to the target.
        Parameters:
        source - the object to copy
        target - the object where to store the copied content