Renaming variable.

better
hummel 2025-04-08 08:34:00 +02:00
parent 3445bc151b
commit 76b8d9afa7
1 changed files with 6 additions and 6 deletions

View File

@ -2,14 +2,14 @@ package de.th_mannheim.informatik.routenplaner.domain;
public class Street implements Comparable<Street> { public class Street implements Comparable<Street> {
private final City start; private final City start;
private final City target; private final City destination;
private final int distance; private final int distance;
public Street(City start, City ziel, int distance) { public Street(City start, City destination, int distance) {
super(); super();
this.start = start; this.start = start;
this.target = ziel; this.destination = destination;
this.distance = distance; this.distance = distance;
} }
@ -20,7 +20,7 @@ public class Street implements Comparable<Street> {
if (diff != 0) if (diff != 0)
return diff; return diff;
if (this.start.equals(v.start) && this.target.equals(v.target)) if (this.start.equals(v.start) && this.destination.equals(v.destination))
return 0; return 0;
// wg. Nutzung von TreeSet // wg. Nutzung von TreeSet
@ -32,7 +32,7 @@ public class Street implements Comparable<Street> {
} }
public City getTarget() { public City getTarget() {
return target; return destination;
} }
public int getDistance() { public int getDistance() {
@ -40,7 +40,7 @@ public class Street implements Comparable<Street> {
} }
public String toString() { public String toString() {
return start.getName() + " -> " + target.getName() + ": " + distance + " km"; return start.getName() + " -> " + destination.getName() + ": " + distance + " km";
} }
} }