From 0514c627b45223dd168150371796bec257653cc9 Mon Sep 17 00:00:00 2001 From: Holt59 Date: Sat, 24 Feb 2018 15:14:37 +0100 Subject: [PATCH] Rename abstract classes. --- src/main/org/insa/graph/io/BinaryGraphReader.java | 2 +- src/main/org/insa/graph/io/BinaryGraphReaderV2.java | 2 +- src/main/org/insa/graph/io/BinaryPathReader.java | 2 +- src/main/org/insa/graph/io/BinaryPathWriter.java | 2 +- .../graph/io/{AbstractGraphReader.java => GraphReader.java} | 2 +- .../graph/io/{AbstractPathReader.java => PathReader.java} | 2 +- .../graph/io/{AbstractPathWriter.java => PathWriter.java} | 2 +- src/main/org/insa/graphics/MainWindow.java | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) rename src/main/org/insa/graph/io/{AbstractGraphReader.java => GraphReader.java} (86%) rename src/main/org/insa/graph/io/{AbstractPathReader.java => PathReader.java} (90%) rename src/main/org/insa/graph/io/{AbstractPathWriter.java => PathWriter.java} (87%) diff --git a/src/main/org/insa/graph/io/BinaryGraphReader.java b/src/main/org/insa/graph/io/BinaryGraphReader.java index 0be885b..27b99ac 100644 --- a/src/main/org/insa/graph/io/BinaryGraphReader.java +++ b/src/main/org/insa/graph/io/BinaryGraphReader.java @@ -12,7 +12,7 @@ import org.insa.graph.Point; import org.insa.graph.RoadInformation; import org.insa.graph.RoadInformation.RoadType; -public class BinaryGraphReader extends BinaryReader implements AbstractGraphReader { +public class BinaryGraphReader extends BinaryReader implements GraphReader { // Map version and magic number targeted for this reader. private static final int VERSION = 4; diff --git a/src/main/org/insa/graph/io/BinaryGraphReaderV2.java b/src/main/org/insa/graph/io/BinaryGraphReaderV2.java index 597d3a7..408cab9 100644 --- a/src/main/org/insa/graph/io/BinaryGraphReaderV2.java +++ b/src/main/org/insa/graph/io/BinaryGraphReaderV2.java @@ -12,7 +12,7 @@ import org.insa.graph.Point; import org.insa.graph.RoadInformation; import org.insa.graph.RoadInformation.RoadType; -public class BinaryGraphReaderV2 extends BinaryReader implements AbstractGraphReader { +public class BinaryGraphReaderV2 extends BinaryReader implements GraphReader { // Map version and magic number targeted for this reader. private static final int VERSION = 5; diff --git a/src/main/org/insa/graph/io/BinaryPathReader.java b/src/main/org/insa/graph/io/BinaryPathReader.java index 53ae922..d3af795 100644 --- a/src/main/org/insa/graph/io/BinaryPathReader.java +++ b/src/main/org/insa/graph/io/BinaryPathReader.java @@ -9,7 +9,7 @@ import org.insa.graph.Node; import org.insa.graph.Path; import org.insa.graph.Path.CreationMode; -public class BinaryPathReader extends BinaryReader implements AbstractPathReader { +public class BinaryPathReader extends BinaryReader implements PathReader { // Map version and magic number targeted for this reader. protected static final int VERSION = 1; diff --git a/src/main/org/insa/graph/io/BinaryPathWriter.java b/src/main/org/insa/graph/io/BinaryPathWriter.java index b8cce09..6a74043 100644 --- a/src/main/org/insa/graph/io/BinaryPathWriter.java +++ b/src/main/org/insa/graph/io/BinaryPathWriter.java @@ -6,7 +6,7 @@ import java.io.IOException; import org.insa.graph.Arc; import org.insa.graph.Path; -public class BinaryPathWriter extends BinaryWriter implements AbstractPathWriter { +public class BinaryPathWriter extends BinaryWriter implements PathWriter { /** * @param dos diff --git a/src/main/org/insa/graph/io/AbstractGraphReader.java b/src/main/org/insa/graph/io/GraphReader.java similarity index 86% rename from src/main/org/insa/graph/io/AbstractGraphReader.java rename to src/main/org/insa/graph/io/GraphReader.java index a1067f6..bef9946 100644 --- a/src/main/org/insa/graph/io/AbstractGraphReader.java +++ b/src/main/org/insa/graph/io/GraphReader.java @@ -4,7 +4,7 @@ import java.io.IOException; import org.insa.graph.Graph; -public interface AbstractGraphReader { +public interface GraphReader { /** * Read a graph an returns it. diff --git a/src/main/org/insa/graph/io/AbstractPathReader.java b/src/main/org/insa/graph/io/PathReader.java similarity index 90% rename from src/main/org/insa/graph/io/AbstractPathReader.java rename to src/main/org/insa/graph/io/PathReader.java index 53feab3..856cf46 100644 --- a/src/main/org/insa/graph/io/AbstractPathReader.java +++ b/src/main/org/insa/graph/io/PathReader.java @@ -5,7 +5,7 @@ import java.io.IOException; import org.insa.graph.Graph; import org.insa.graph.Path; -public interface AbstractPathReader { +public interface PathReader { /** * Read a path of the given graph and returns it. diff --git a/src/main/org/insa/graph/io/AbstractPathWriter.java b/src/main/org/insa/graph/io/PathWriter.java similarity index 87% rename from src/main/org/insa/graph/io/AbstractPathWriter.java rename to src/main/org/insa/graph/io/PathWriter.java index 0e27037..0b54cc0 100644 --- a/src/main/org/insa/graph/io/AbstractPathWriter.java +++ b/src/main/org/insa/graph/io/PathWriter.java @@ -4,7 +4,7 @@ import java.io.IOException; import org.insa.graph.Path; -public interface AbstractPathWriter { +public interface PathWriter { /** * Write a path. diff --git a/src/main/org/insa/graphics/MainWindow.java b/src/main/org/insa/graphics/MainWindow.java index 5678bfe..72fbab2 100644 --- a/src/main/org/insa/graphics/MainWindow.java +++ b/src/main/org/insa/graphics/MainWindow.java @@ -49,7 +49,7 @@ import org.insa.algo.weakconnectivity.WeaklyConnectedComponentsData; import org.insa.graph.Graph; import org.insa.graph.Node; import org.insa.graph.Path; -import org.insa.graph.io.AbstractGraphReader; +import org.insa.graph.io.GraphReader; import org.insa.graph.io.BinaryGraphReader; import org.insa.graph.io.BinaryGraphReaderV2; import org.insa.graph.io.BinaryPathReader; @@ -286,7 +286,7 @@ public class MainWindow extends JFrame { JOptionPane.showMessageDialog(MainWindow.this, "Cannot open the selected file."); return; } - AbstractGraphReader reader; + GraphReader reader; if (path.endsWith(".map2") || path.endsWith("mapgr")) { reader = new BinaryGraphReaderV2(stream); }