Skip to main content
Collecting Parameter

Also known as

  • Collector
  • Accumulator

Intent

Aims to simplify methods that collect information by passing a single collection object through various method calls, allowing them to add results to this collection rather than each method creating its own collection.


iluwatarAbout 4 minBehavioralAccumulationGeneric
Factory Kit

Also known as

  • Object Kit
  • Toolkit

Intent

Define a factory of immutable content with separated builder and factory interfaces.

Explanation

Real-world example

Imagine a magical weapon factory that can create any type of weapon wished for. When the factory is unboxed, the master recites the weapon types needed to prepare it. After that, any of those weapon types can be summoned in an instant.


iluwatarAbout 2 minCreationalDecouplingEncapsulationGenericInstantiationObject composition