Class CounterFlyweightFactory

    • Constructor Summary

      Constructors 
      Constructor Description
      CounterFlyweightFactory​(java.lang.String workload, boolean forceUnshared)
      Creates new Factory for flyweights
    • Constructor Detail

      • CounterFlyweightFactory

        public CounterFlyweightFactory​(java.lang.String workload,
                                       boolean forceUnshared)
        Creates new Factory for flyweights
        Parameters:
        workload - simulated workload
        forceUnshared - if true, this factory will only return unshared flyweights
    • Method Detail

      • createCounterFlyweight

        public CounterFlyweight createCounterFlyweight​(char c)
        Returns a concrete Flyweight (created once on demand)
        Parameters:
        c - the character to be counted
        Returns:
        CountStrategyFlyweight