diff --git a/src/main/java/com/designpatterns/builderpattern/Desktop.java b/src/main/java/com/designpatterns/creational/builder/Desktop.java similarity index 97% rename from src/main/java/com/designpatterns/builderpattern/Desktop.java rename to src/main/java/com/designpatterns/creational/builder/Desktop.java index 19943de3..d66ecf36 100644 --- a/src/main/java/com/designpatterns/builderpattern/Desktop.java +++ b/src/main/java/com/designpatterns/creational/builder/Desktop.java @@ -1,4 +1,4 @@ -package src.main.java.com.designpatterns.builderpattern; +package src.main.java.com.designpatterns.creational.builder; /** * The Builder is a design pattern designed to provide a flexible solution to various object creation problems in diff --git a/src/main/java/com/designpatterns/factorypattern/Pentagon.java b/src/main/java/com/designpatterns/creational/factory/Pentagon.java similarity index 78% rename from src/main/java/com/designpatterns/factorypattern/Pentagon.java rename to src/main/java/com/designpatterns/creational/factory/Pentagon.java index a7ad7c3d..2d70f0dd 100644 --- a/src/main/java/com/designpatterns/factorypattern/Pentagon.java +++ b/src/main/java/com/designpatterns/creational/factory/Pentagon.java @@ -1,4 +1,4 @@ -package src.main.java.com.designpatterns.factorypattern; +package src.main.java.com.designpatterns.creational.factory; public class Pentagon implements Polygon { @Override diff --git a/src/main/java/com/designpatterns/factorypattern/Polygon.java b/src/main/java/com/designpatterns/creational/factory/Polygon.java similarity index 86% rename from src/main/java/com/designpatterns/factorypattern/Polygon.java rename to src/main/java/com/designpatterns/creational/factory/Polygon.java index 415d6734..0d5b4c9e 100644 --- a/src/main/java/com/designpatterns/factorypattern/Polygon.java +++ b/src/main/java/com/designpatterns/creational/factory/Polygon.java @@ -1,4 +1,4 @@ -package src.main.java.com.designpatterns.factorypattern; +package src.main.java.com.designpatterns.creational.factory; public interface Polygon { /** diff --git a/src/main/java/com/designpatterns/factorypattern/PolygonFactory.java b/src/main/java/com/designpatterns/creational/factory/PolygonFactory.java similarity index 95% rename from src/main/java/com/designpatterns/factorypattern/PolygonFactory.java rename to src/main/java/com/designpatterns/creational/factory/PolygonFactory.java index 08dc9e42..8b314724 100644 --- a/src/main/java/com/designpatterns/factorypattern/PolygonFactory.java +++ b/src/main/java/com/designpatterns/creational/factory/PolygonFactory.java @@ -1,4 +1,4 @@ -package src.main.java.com.designpatterns.factorypattern; +package src.main.java.com.designpatterns.creational.factory; /** * In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal diff --git a/src/main/java/com/designpatterns/factorypattern/Square.java b/src/main/java/com/designpatterns/creational/factory/Square.java similarity index 77% rename from src/main/java/com/designpatterns/factorypattern/Square.java rename to src/main/java/com/designpatterns/creational/factory/Square.java index 30f9d234..562233cd 100644 --- a/src/main/java/com/designpatterns/factorypattern/Square.java +++ b/src/main/java/com/designpatterns/creational/factory/Square.java @@ -1,4 +1,4 @@ -package src.main.java.com.designpatterns.factorypattern; +package src.main.java.com.designpatterns.creational.factory; public class Square implements Polygon { diff --git a/src/main/java/com/designpatterns/factorypattern/Triangle.java b/src/main/java/com/designpatterns/creational/factory/Triangle.java similarity index 78% rename from src/main/java/com/designpatterns/factorypattern/Triangle.java rename to src/main/java/com/designpatterns/creational/factory/Triangle.java index 69beb14e..d95228b0 100644 --- a/src/main/java/com/designpatterns/factorypattern/Triangle.java +++ b/src/main/java/com/designpatterns/creational/factory/Triangle.java @@ -1,4 +1,4 @@ -package src.main.java.com.designpatterns.factorypattern; +package src.main.java.com.designpatterns.creational.factory; public class Triangle implements Polygon { @Override diff --git a/src/main/java/com/designpatterns/singletonpattern/Singleton.java b/src/main/java/com/designpatterns/creational/singleton/Singleton.java similarity index 96% rename from src/main/java/com/designpatterns/singletonpattern/Singleton.java rename to src/main/java/com/designpatterns/creational/singleton/Singleton.java index f846c33b..9591303b 100644 --- a/src/main/java/com/designpatterns/singletonpattern/Singleton.java +++ b/src/main/java/com/designpatterns/creational/singleton/Singleton.java @@ -1,4 +1,4 @@ -package src.main.java.com.designpatterns.singletonpattern; +package src.main.java.com.designpatterns.creational.singleton; /** * The singleton pattern is a design pattern that restricts the instantiation of a class to one "single" instance. diff --git a/src/test/java/com/designpatterns/builderpattern/DesktopBuilderTest.java b/src/test/java/com/designpatterns/creational/builder/DesktopBuilderTest.java similarity index 90% rename from src/test/java/com/designpatterns/builderpattern/DesktopBuilderTest.java rename to src/test/java/com/designpatterns/creational/builder/DesktopBuilderTest.java index c57b1f97..2f8e4ced 100644 --- a/src/test/java/com/designpatterns/builderpattern/DesktopBuilderTest.java +++ b/src/test/java/com/designpatterns/creational/builder/DesktopBuilderTest.java @@ -1,8 +1,8 @@ -package src.test.java.com.designpatterns.builderpattern; +package src.test.java.com.designpatterns.creational.builder; import org.junit.Assert; import org.junit.Test; -import src.main.java.com.designpatterns.builderpattern.Desktop; +import src.main.java.com.designpatterns.creational.builder.Desktop; public class DesktopBuilderTest { private final String configOne = "Desktop{CPU='Intel i7', RAM='Corsair Vengeance 3000', isGraphicCardEnabled=true" + diff --git a/src/test/java/com/designpatterns/factorypattern/PolygonFactoryTest.java b/src/test/java/com/designpatterns/creational/factory/PolygonFactoryTest.java similarity index 85% rename from src/test/java/com/designpatterns/factorypattern/PolygonFactoryTest.java rename to src/test/java/com/designpatterns/creational/factory/PolygonFactoryTest.java index c175911b..d8ea6591 100644 --- a/src/test/java/com/designpatterns/factorypattern/PolygonFactoryTest.java +++ b/src/test/java/com/designpatterns/creational/factory/PolygonFactoryTest.java @@ -1,9 +1,9 @@ -package src.test.java.com.designpatterns.factorypattern; +package src.test.java.com.designpatterns.creational.factory; import org.junit.Assert; import org.junit.Test; -import src.main.java.com.designpatterns.factorypattern.Polygon; -import src.main.java.com.designpatterns.factorypattern.PolygonFactory; +import src.main.java.com.designpatterns.creational.factory.Polygon; +import src.main.java.com.designpatterns.creational.factory.PolygonFactory; public class PolygonFactoryTest { @Test diff --git a/src/test/java/com/designpatterns/singletonpattern/SingletonTest.java b/src/test/java/com/designpatterns/creational/singleton/SingletonTest.java similarity index 91% rename from src/test/java/com/designpatterns/singletonpattern/SingletonTest.java rename to src/test/java/com/designpatterns/creational/singleton/SingletonTest.java index b3c33612..83744949 100644 --- a/src/test/java/com/designpatterns/singletonpattern/SingletonTest.java +++ b/src/test/java/com/designpatterns/creational/singleton/SingletonTest.java @@ -1,8 +1,8 @@ -package src.test.java.com.designpatterns.singletonpattern; +package src.test.java.com.designpatterns.creational.singleton; import org.junit.Assert; import org.junit.Test; -import src.main.java.com.designpatterns.singletonpattern.Singleton; +import src.main.java.com.designpatterns.creational.singleton.Singleton; import java.util.ArrayList; import java.util.concurrent.ExecutorService;