Class GuavaOptionalCloner

java.lang.Object
com.comphenix.protocol.reflect.cloning.GuavaOptionalCloner
All Implemented Interfaces:
Cloner

public class GuavaOptionalCloner extends Object implements Cloner
A cloner that can clone Guava Optional objects
  • Field Details

    • wrapped

      protected Cloner wrapped
  • Constructor Details

    • GuavaOptionalCloner

      public GuavaOptionalCloner(Cloner wrapped)
  • Method Details

    • canClone

      public boolean canClone(Object source)
      Description copied from interface: Cloner
      Determine whether the current cloner can clone the given object.
      Specified by:
      canClone in interface Cloner
      Parameters:
      source - - the object that is being considered.
      Returns:
      TRUE if this cloner can actually clone the given object, FALSE otherwise.
    • clone

      public Object clone(Object source)
      Description copied from interface: Cloner
      Perform the clone.

      This method should never be called unless a corresponding Cloner.canClone(Object) returns TRUE.

      Specified by:
      clone in interface Cloner
      Parameters:
      source - - the value to clone.
      Returns:
      A cloned value.
    • getWrapped

      public Cloner getWrapped()