aboutsummaryrefslogtreecommitdiff
path: root/src/com.example.portfolio3/com/example/portfolio3/Edge.java
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2025-04-29 07:19:10 +0200
committerJonas Smedegaard <dr@jones.dk>2025-04-29 07:19:10 +0200
commit705b7a5a32793f7ed8a24b8b35afe3f9d49348be (patch)
tree7cffeb0de03a4638b87f04e01e7193eacbeaeede /src/com.example.portfolio3/com/example/portfolio3/Edge.java
parenta5c3599d7bc7a9ef5583ad2d50a55975f030fbea (diff)
tidy whitespace
Diffstat (limited to 'src/com.example.portfolio3/com/example/portfolio3/Edge.java')
-rw-r--r--src/com.example.portfolio3/com/example/portfolio3/Edge.java70
1 files changed, 41 insertions, 29 deletions
diff --git a/src/com.example.portfolio3/com/example/portfolio3/Edge.java b/src/com.example.portfolio3/com/example/portfolio3/Edge.java
index 7cb8d5a..065b6ae 100644
--- a/src/com.example.portfolio3/com/example/portfolio3/Edge.java
+++ b/src/com.example.portfolio3/com/example/portfolio3/Edge.java
@@ -3,33 +3,45 @@ package com.example.portfolio3;
// origin: <https://moodle.ruc.dk/course/section.php?id=211877>
/// foo
-public class Edge{
-
- /// foo
- private Vertex from,to;
-
- /// foo
- private int weight;
-
- /// foo
- /// @return Vertex
- public Vertex from(){return from;}
-
- /// foo
- /// @return Vertex
- public Vertex to(){return to;}
-
- /// foo
- /// @return int
- public int weight(){return weight;}
-
- /// foo
- /// @param from foo
- /// @param to foo
- /// @param w foo
- Edge(final Vertex from, final Vertex to, final int w){this.from=from; this.to=to; weight=w;}
-
- /// foo
- /// @return String
- public String toString(){return from.name()+" - "+weight+" -> "+to.name(); }
+public class Edge {
+
+ /// foo
+ private Vertex from, to;
+
+ /// foo
+ private int weight;
+
+ /// foo
+ /// @return Vertex
+ public Vertex from() {
+ return from;
+ }
+
+ /// foo
+ /// @return Vertex
+ public Vertex to() {
+ return to;
+ }
+
+ /// foo
+ /// @return int
+ public int weight() {
+ return weight;
+ }
+
+ /// foo
+ /// @param from foo
+ /// @param to foo
+ /// @param w foo
+ Edge(final Vertex from, final Vertex to, final int w) {
+ this.from = from;
+ this.to = to;
+ weight = w;
+ }
+
+ /// foo
+ /// @return String
+ public String toString() {
+ return from.name() + " - " + weight + " -> " + to.name();
+ }
}