From 42dbe29f92a7c1778bfd0a956775100cb00fc3bb Mon Sep 17 00:00:00 2001 From: Christian Wulf <chw@informatik.uni-kiel.de> Date: Fri, 15 Aug 2014 09:05:28 +0200 Subject: [PATCH] added further pipe factories --- .../framework/core/pipe/IPipeFactory.java | 1 + .../core/pipe/OrderedGrowableArrayPipeFactory.java | 13 +++++++++++++ .../core/pipe/SingleElementPipeFactory.java | 13 +++++++++++++ submodules/JCTools | 2 +- 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/OrderedGrowableArrayPipeFactory.java create mode 100644 src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/SingleElementPipeFactory.java diff --git a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/IPipeFactory.java b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/IPipeFactory.java index b6dbc5f9..8e55a094 100644 --- a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/IPipeFactory.java +++ b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/IPipeFactory.java @@ -3,4 +3,5 @@ package teetime.variant.methodcallWithPorts.framework.core.pipe; public interface IPipeFactory { <T> IPipe<T> create(int capacity); + } diff --git a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/OrderedGrowableArrayPipeFactory.java b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/OrderedGrowableArrayPipeFactory.java new file mode 100644 index 00000000..80445efe --- /dev/null +++ b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/OrderedGrowableArrayPipeFactory.java @@ -0,0 +1,13 @@ +package teetime.variant.methodcallWithPorts.framework.core.pipe; + +public class OrderedGrowableArrayPipeFactory implements IPipeFactory { + + /** + * Hint: The capacity for this pipe implementation is ignored + */ + @Override + public <T> IPipe<T> create(final int capacity) { + return new OrderedGrowableArrayPipe<T>(); + } + +} diff --git a/src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/SingleElementPipeFactory.java b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/SingleElementPipeFactory.java new file mode 100644 index 00000000..a6f83738 --- /dev/null +++ b/src/main/java/teetime/variant/methodcallWithPorts/framework/core/pipe/SingleElementPipeFactory.java @@ -0,0 +1,13 @@ +package teetime.variant.methodcallWithPorts.framework.core.pipe; + +public class SingleElementPipeFactory implements IPipeFactory { + + /** + * Hint: The capacity for this pipe implementation is ignored + */ + @Override + public <T> IPipe<T> create(final int capacity) { + return new SingleElementPipe<T>(); + } + +} diff --git a/submodules/JCTools b/submodules/JCTools index 88e1e25f..75998aa2 160000 --- a/submodules/JCTools +++ b/submodules/JCTools @@ -1 +1 @@ -Subproject commit 88e1e25f9519b250258c7e5ada30935975ab2d10 +Subproject commit 75998aa20b7ec897ec321c1f94192de888f2dc6e -- GitLab