Class AbstractVoucherCreator

java.lang.Object
de.calamanari.pk.factorymethod.AbstractVoucherCreator
Direct Known Subclasses:
FreakliesShopVoucherCreator, MoronStoreVoucherCreator

public abstract class AbstractVoucherCreator
extends java.lang.Object
Abstract Voucher Creator is the abstract creator in this FACTORY METHOD example scenario.
Author:
Karl Eilebrecht
  • Constructor Summary

    Constructors
    Constructor Description
    AbstractVoucherCreator()  
  • Method Summary

    Modifier and Type Method Description
    abstract AbstractVoucher createVoucher​(java.lang.String firstName, java.lang.String lastName, double value)
    Central method in this FACTORY METHOD example.
    Concrete voucher creators return a new voucher using the given arguments and their special data/logic.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • createVoucher

      public abstract AbstractVoucher createVoucher​(java.lang.String firstName, java.lang.String lastName, double value)
      Central method in this FACTORY METHOD example.
      Concrete voucher creators return a new voucher using the given arguments and their special data/logic.
      Parameters:
      firstName - first name of the voucher owner
      lastName - last name of the voucher owner
      value - voucher's value
      Returns:
      new concrete voucher