From a3302e19109db22910da8683b5efa9c254e9c589 Mon Sep 17 00:00:00 2001
From: Christian Wulf <chw@informatik.uni-kiel.de>
Date: Sun, 28 Jun 2015 13:18:23 +0200
Subject: [PATCH] minor refactorings

---
 .../java/teetime/framework/AbstractPort.java  | 36 +++++++++----------
 src/site/markdown/wiki                        |  1 -
 2 files changed, 16 insertions(+), 21 deletions(-)
 delete mode 160000 src/site/markdown/wiki

diff --git a/src/main/java/teetime/framework/AbstractPort.java b/src/main/java/teetime/framework/AbstractPort.java
index 0544c479..f6664b54 100644
--- a/src/main/java/teetime/framework/AbstractPort.java
+++ b/src/main/java/teetime/framework/AbstractPort.java
@@ -19,47 +19,43 @@ import teetime.framework.pipe.IPipe;
 
 public abstract class AbstractPort<T> {
 
-	private final String portName;
-
-	protected IPipe pipe;
 	/**
 	 * The type of this port.
 	 * <p>
 	 * <i>Used to validate the connection between two ports at runtime.</i>
 	 * </p>
 	 */
-	protected final Class<T> type;
+	private final Class<T> type;
 	private final Stage owningStage;
+	private final String name;
 
-	public AbstractPort(final Class<T> type, final Stage owningStage, final String portName) {
+	protected IPipe pipe;
+
+	public AbstractPort(final Class<T> type, final Stage owningStage, final String name) {
 		super();
-		this.portName = portName;
 		this.type = type;
 		this.owningStage = owningStage;
+		this.name = (name != null) ? name : super.toString();
 	}
 
-	public IPipe getPipe() {
-		return this.pipe;
+	public Class<T> getType() {
+		return this.type;
 	}
 
-	public void setPipe(final IPipe pipe) {
-		this.pipe = pipe;
+	public Stage getOwningStage() {
+		return owningStage;
 	}
 
-	public Class<T> getType() {
-		return this.type;
+	public IPipe getPipe() {
+		return this.pipe;
 	}
 
-	public final Stage getOwningStage() {
-		return owningStage;
+	public void setPipe(final IPipe pipe) {
+		this.pipe = pipe;
 	}
 
 	@Override
-	public final String toString() {
-		if (portName == null) {
-			return super.toString();
-		} else {
-			return portName;
-		}
+	public String toString() {
+		return name;
 	}
 }
diff --git a/src/site/markdown/wiki b/src/site/markdown/wiki
deleted file mode 160000
index 709c839c..00000000
--- a/src/site/markdown/wiki
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 709c839c447a50c93b37fcc633a01297115d4823
-- 
GitLab