Java Design patterns
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package javadevjournal.design.creational.abstractfactory;
|
||||
|
||||
/**
|
||||
* @author Kunwar
|
||||
*/
|
||||
public class FactoryOfFactory {
|
||||
public static AbstractFactory getFactory(boolean rounded){
|
||||
if(rounded){
|
||||
return new RoundedShapeFactory();
|
||||
}else{
|
||||
return new ShapeFactory();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user