diff options
author | Jonas Smedegaard <dr@jones.dk> | 2025-04-29 07:19:10 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2025-04-29 07:19:10 +0200 |
commit | 705b7a5a32793f7ed8a24b8b35afe3f9d49348be (patch) | |
tree | 7cffeb0de03a4638b87f04e01e7193eacbeaeede /src/com.example.portfolio3/com/example/portfolio3/Edge.java | |
parent | a5c3599d7bc7a9ef5583ad2d50a55975f030fbea (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.java | 70 |
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(); + } } |