Interface Prototype

All Known Implementing Classes:
ConcretePrototype1, ConcretePrototype2

public interface Prototype
Interface for the Prototype pattern. Defines the contract for cloning objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a clone of the current object.
    void
    Displays the details of the prototype.
  • Method Details

    • clone

      Prototype clone()
      Creates a clone of the current object.
      Returns:
      A new object that is a copy of the current object.
    • display

      void display()
      Displays the details of the prototype.