Class IdentityCopier<T>

java.lang.Object
org.ehcache.impl.copy.ReadWriteCopier<T>
org.ehcache.impl.copy.IdentityCopier<T>
All Implemented Interfaces:
org.ehcache.spi.copy.Copier<T>

public final class IdentityCopier<T> extends ReadWriteCopier<T>
Copier implementation that simply returns the value passed in, doing in fact no copy at all.
  • Constructor Details

    • IdentityCopier

      public IdentityCopier()
  • Method Details

    • identityCopier

      public static <T> org.ehcache.spi.copy.Copier<T> identityCopier()
    • copy

      public T copy(T obj)
      This implementation returns the instance passed in as-is.
      Specified by:
      copy in class ReadWriteCopier<T>
      Parameters:
      obj - the instance to copy
      Returns:
      a copied instance, depending on the implementation