StrategyPattern Java Api