Class FlyweightFactory


public class FlyweightFactory
extends Object
A factory that creates BallFlyweights with specific radii, colors, containers, and strategies. If a flyweight with the given specifications already exists, the same flyweight is reused, otherwise a new instance is created.


Variable Index

 o hash
 o hashFlyweight
 o tempFlyweight

Method Index

 o getFlyweight (int, Color, Container, AStrategy)

Variables

 o hash
Hashtable hash
 o tempFlyweight
private BallFlyweight tempFlyweight
 o hashFlyweight
private BallFlyweight hashFlyweight

Methods

 o getFlyweight
public BallFlyweight getFlyweight(int r, Color col, Container c, AStrategy a)