diff options
author | Jonas Smedegaard <dr@jones.dk> | 2025-04-20 19:39:42 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2025-04-20 19:39:42 +0200 |
commit | 79e04705c6eeed95992e5753a8328aad90e02f68 (patch) | |
tree | cc75e2753cf09097d60037f7ba44b4055ba19c42 /com/example/portfolio3/Edge.java | |
parent | d008224669e9b9cd9264c4779f0c660f32b7458b (diff) |
move each auxiliary class to own file, to please javadoc
Diffstat (limited to 'com/example/portfolio3/Edge.java')
-rw-r--r-- | com/example/portfolio3/Edge.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/com/example/portfolio3/Edge.java b/com/example/portfolio3/Edge.java new file mode 100644 index 0000000..abc3c72 --- /dev/null +++ b/com/example/portfolio3/Edge.java @@ -0,0 +1,37 @@ +package com.example.portfolio3; + +// origin: <https://moodle.ruc.dk/course/section.php?id=211877> + +import java.util.*; + +/// foo +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(Vertex from,Vertex to,int w){this.from=from; this.to=to; weight=w;} + + /// foo + /// @return String + public String toString(){return from.name()+" - "+weight+" -> "+to.name(); } +} |