Class ConcreteFlyweight

java.lang.Object
Structural.Flyweight.ConcreteFlyweight
All Implemented Interfaces:
Flyweight

public class ConcreteFlyweight extends Object implements Flyweight
Concrete implementation of the Flyweight interface. Represents a shared object with intrinsic state.
  • Constructor Details

    • ConcreteFlyweight

      public ConcreteFlyweight(String intrinsicState)
      Constructor initializes the intrinsic state of the Flyweight.
      Parameters:
      intrinsicState - Shared state for the Flyweight.
  • Method Details

    • operation

      public void operation(String extrinsicState)
      Description copied from interface: Flyweight
      Operation performed by the Flyweight object.
      Specified by:
      operation in interface Flyweight
      Parameters:
      extrinsicState - State provided by the client at runtime.