• Home
  • Docker
  • Kubernetes
  • LLMs
  • Java
  • Ubuntu
  • Maven
  • Big Data
  • Archived
Design Patterns | Command
  1. References
  2. Example
    • The Receiver
    • The Concrete Receiver (1)
    • The Concrete Receiver (2)
    • The Command
    • The Concrete Command
    • The Caller
    • A simple class to test the Command design pattern

  1. References
    • Definition: (source: http://en.wikipedia.org/wiki/Command_pattern)

      The Command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an action or trigger an event at a later time.

    • Class diagram: (source: http://en.wikipedia.org/wiki/Command_pattern)

      Command Pattern
  2. Example
    • The Receiver:


    • The Concrete Receiver (1):


    • The Concrete Receiver (2):


    • The Command:


    • The Concrete Command:


    • The Caller:


    • A simple class to test the Command design pattern:


© 2025  mtitek