From 79e04705c6eeed95992e5753a8328aad90e02f68 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 20 Apr 2025 19:39:42 +0200 Subject: move each auxiliary class to own file, to please javadoc --- com/example/portfolio3/Edge.java | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 com/example/portfolio3/Edge.java (limited to 'com/example/portfolio3/Edge.java') 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: + +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(); } +} -- cgit v1.2.3