From 27bf571d6413c3cc6a5d664b5bddd38d21d7b1cd Mon Sep 17 00:00:00 2001 From: EVE Date: Mon, 13 Mar 2017 16:42:21 -0400 Subject: Formatting --- BJC-Utils2/src/main/java/bjc/utils/graph/Edge.java | 27 +++++++++------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/graph/Edge.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/graph/Edge.java b/BJC-Utils2/src/main/java/bjc/utils/graph/Edge.java index 2ad4132..c77c0ba 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/graph/Edge.java +++ b/BJC-Utils2/src/main/java/bjc/utils/graph/Edge.java @@ -6,36 +6,34 @@ package bjc.utils.graph; * @author ben * * @param - * The type of the nodes in the graph + * The type of the nodes in the graph */ public class Edge { /* * The distance from initial to terminal node */ - private final int distance; + private final int distance; /* * The initial and terminal nodes of this edge */ - private final T source, target; + private final T source, target; /** * Create a new edge with set parameters * * @param initial - * The initial node of the edge + * The initial node of the edge * @param terminal - * The terminal node of the edge + * The terminal node of the edge * @param distance - * The distance between initial and terminal edge + * The distance between initial and terminal edge */ public Edge(T initial, T terminal, int distance) { if (initial == null) { - throw new NullPointerException( - "Initial node must not be null"); + throw new NullPointerException("Initial node must not be null"); } else if (terminal == null) { - throw new NullPointerException( - "Terminal node must not be null"); + throw new NullPointerException("Terminal node must not be null"); } this.source = initial; @@ -109,17 +107,14 @@ public class Edge { int result = 1; result = prime * result + distance; - result = prime * result - + ((source == null) ? 0 : source.hashCode()); - result = prime * result - + ((target == null) ? 0 : target.hashCode()); + result = prime * result + ((source == null) ? 0 : source.hashCode()); + result = prime * result + ((target == null) ? 0 : target.hashCode()); return result; } @Override public String toString() { - return " first vertex " + source + " to vertex " + target - + " with distance: " + distance; + return " first vertex " + source + " to vertex " + target + " with distance: " + distance; } } -- cgit v1.2.3