# Can anyone help me with Java

#### raystriker

##### The powers that be
OP
Member
Here's the deal, my goal is to write a program to determine the shortest path between any two points on the map.

The following helper class expresses the distance to another city:
public class DistanceTo implements Comparable<DistanceTo>
{
private String target;
private int distance;
public DistanceTo(String city, int dist) { target = city; distance = dist; }
public String getTarget() { return target; }
public int getDistance() { return distance; }
public int compareTo(DistanceTo other) { return distance - other.distance; }
}

All direct connections between cities are stored in a Map<String, TreeSet<DistanceTo>> .

The algorithm now proceeds as follows:
Let from be the starting point.
Add DistanceTo(from, 0) to a priority queue.
Construct a map shortestKnownDistance from city names to distances.
While the priority queue is not empty
Get its smallest element.
If its target is not a key in shortestKnownDistance
Let d be the distance to that target.
Put (target, d) into shortestKnownDistance.
For all cities c that have a direct connection from target
Add DistanceTo(c, d + distance from target to c) to the priority queue.
When the algorithm has finished, shortestKnownDistance contains the shortest distance
from the starting point to all reachable targets.

"Your task is to write a program that implements this algorithm. Your program
should read in lines of the form city 1 city 2 distance . The starting point is the first city in
the first line. Print the shortest distances to all other cities."

This is what I've come up with-
Route.java
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Scanner;
import java.util.TreeSet;
//The public class route is defined, which would store all the information about how the different cities are connected.
public class Route
{
//A map which stores all direct connections
//between cities
static Map<String,TreeSet> cities= new HashMap();
public static void main(String[] args)
{
//The map is defined in the mapInput method
//starting Point is the starting city input
//from the user
String startingPoint;
Scanner sc = new Scanner(System.in);
System.out.print("Enter the starting point:");
startingPoint = sc.next();
//The priority queue is the data structure which is used to hold the cities to transverse in the order of priority.
//Priority queue p which holds list of cities to
//traverse in priority in ascending order of their
//distances
PriorityQueue p = new PriorityQueue ();
p.add(new DistanceTo(startingPoint, 0));
//shortestKnownDistance will contain the
//shortest distance from the starting point to
//all reachable targets.
Map shortestKnownDistance = new HashMap();
DistanceTo smallest = null;
String visited = "";
//The array is defined which would contain the list of traversed cities.
//list contains the list of traversed cities
ArrayList list = new ArrayList();
while (p.size() > 0)
{
if (smallest != null && visited !=smallest.getTarget())
{
visited = smallest.getTarget();
System.out.print(visited + "-");
}
//The city with the least distance must be removed from the priority queue.
// Removing the city with least distance from
//the priority queue
smallest = p.remove();
//Adding smallest to the list of cities visited
list.add(smallest.getTarget());
if (visited != smallest.getTarget() && visited != "")
{
System.out.println(smallest.getTarget() + " " + smallest.getDistance());
}
if(shortestKnownDistance.containsKey
(smallest.getTarget())) {}
else
{
int distanceToTarget;
distanceToTarget = smallest.getDistance();
// The target and the distance of smallest are
// added to the map.
shortestKnownDistance.put(smallest.getTarget() , distanceToTarget);
//Range holds all the possible connections from
//smallest.getTarget()
TreeSet range = new
TreeSet();
range = cities.get(smallest.getTarget());
for (DistanceTo t : range)
{
// Checking if the city has already been
// traversed
if (list.contains(t.getTarget())) {}
else
{
DistanceTo e = new DistanceTo
(t.getTarget(),distanceToTarget + t.getDistance());
p.add(e);
}
}
}
}
//Output of shortest known distances from the
// starting city
System.out.println(shortestKnownDistance);
}

//The method which creates the inputs to map the cities connected in the network is now defined.
// Method which creates the inputs to the map
//'cities'
// A city and all its connections and the
// distances to them are added to the map
public static void mapInput()
{
TreeSet s1 = new TreeSet ();
TreeSet s2 = new TreeSet ();
TreeSet s3 = new TreeSet ();
TreeSet s4 = new TreeSet ();
TreeSet s5 = new TreeSet ();
TreeSet s6 = new TreeSet ();
TreeSet s7 = new TreeSet ();
TreeSet s8 = new TreeSet ();
TreeSet s9 = new TreeSet ();
TreeSet s10 = new TreeSet ();
TreeSet s11 = new TreeSet ();
TreeSet s12 = new TreeSet ();
TreeSet s13 = new TreeSet ();
TreeSet s14 = new TreeSet ();
TreeSet s15 = new TreeSet ();
TreeSet s16 = new TreeSet ();
TreeSet s17 = new TreeSet ();
TreeSet s18 = new TreeSet ();
TreeSet s19 = new TreeSet ();
TreeSet s20 = new TreeSet ();
TreeSet s21 = new TreeSet ();
TreeSet s22 = new TreeSet ();
TreeSet s23 = new TreeSet ();
TreeSet s24 = new TreeSet ();
TreeSet s25 = new TreeSet ();
TreeSet s26 = new TreeSet ();
TreeSet s27 = new TreeSet ();
TreeSet s28 = new TreeSet ();
TreeSet s29 = new TreeSet ();
TreeSet s30 = new TreeSet ();
TreeSet s31 = new TreeSet ();
TreeSet s32 = new TreeSet ();
TreeSet s33 = new TreeSet ();
TreeSet s34 = new TreeSet ();
TreeSet s35 = new TreeSet ();
TreeSet s36 = new TreeSet ();

s1.add(new DistanceTo("seattle", 1));
s1.add(new DistanceTo("calgary", 3));
cities.put("vancouver", s1);

s2.add(new DistanceTo("vancouver", 3));
s2.add(new DistanceTo("winnipeg", 6));
cities.put("calgary", s2);

s3.add(new DistanceTo("vancouver", 1));
s3.add(new DistanceTo("portland", 1));
s3.add(new DistanceTo("helena", 6));
s3.add(new DistanceTo("calgary", 4));
cities.put("seattle", s3);

s4.add(new DistanceTo("seattle", 1));
s4.add(new DistanceTo("salt lake city", 6));
s4.add(new DistanceTo("san francisco", 5));
cities.put("portland", s4);

s5.add(new DistanceTo("portland", 5));
s5.add(new DistanceTo("salt lake city", 5));
s5.add(new DistanceTo("los angeles", 3));
cities.put("san francisco", s5);

s6.add(new DistanceTo("san francisco", 3));
s6.add(new DistanceTo("las vegas", 2));
s6.add(new DistanceTo("el paso", 6));
s6.add(new DistanceTo("phoenix", 3));
cities.put("los angeles", s6);

s7.add(new DistanceTo("santa fe", 2));
s7.add(new DistanceTo("los angeles", 6));
s7.add(new DistanceTo("phoenix", 3));
s7.add(new DistanceTo("houston", 6));
s7.add(new DistanceTo("dallas", 4));
s7.add(new DistanceTo("oklahoma city", 5));
cities.put("el paso", s7);

s8.add(new DistanceTo("denver", 5));
s8.add(new DistanceTo("los angeles", 3));
s8.add(new DistanceTo("santa fe", 3));
s8.add(new DistanceTo("el paso", 3));
cities.put("phoenix", s8);

s9.add(new DistanceTo("los angeles", 2));
s9.add(new DistanceTo("salt lake city", 3));
cities.put("las vegas", s9);

s10.add(new DistanceTo("denver", 2));
s10.add(new DistanceTo("el paso", 2));
s10.add(new DistanceTo("phoenix", 3));
s10.add(new DistanceTo("oklahoma city", 3));
s10.add(new DistanceTo("denver", 2));
cities.put("santa fe", s10);

s11.add(new DistanceTo("salt lake city", 3));
s11.add(new DistanceTo("omaha", 4));
s11.add(new DistanceTo("oklahoma city", 4));
s11.add(new DistanceTo("helena", 4));
s11.add(new DistanceTo("santa fe", 2));
s11.add(new DistanceTo("phoenix", 5));
s11.add(new DistanceTo("kansas city", 4));
cities.put("denver", s11);

s12.add(new DistanceTo("dallas", 1));
s12.add(new DistanceTo("el paso", 6));
s12.add(new DistanceTo("new orleans", 2));
cities.put("houston", s12);

s13.add(new DistanceTo("houston", 2));
s13.add(new DistanceTo("little rock", 3));
s13.add(new DistanceTo("miami", 6));
s13.add(new DistanceTo("atlanta", 4));
cities.put("new orleans", s13);

s14.add(new DistanceTo("charleston", 4));
s14.add(new DistanceTo("atlanta", 5));
s14.add(new DistanceTo("new orleans", 6));
cities.put("miami", s14);

s15.add(new DistanceTo("atlanta", 2));
s15.add(new DistanceTo("miami", 4));
s15.add(new DistanceTo("raleigh", 2));
cities.put("charleston", s15);

s16.add(new DistanceTo("atlanta", 2));
s16.add(new DistanceTo("pittsburg", 2));
s16.add(new DistanceTo("washington", 2));
s16.add(new DistanceTo("nashville", 3));
s16.add(new DistanceTo("charleston", 2));
cities.put("raleigh", s16);

s17.add(new DistanceTo("nashville", 1));
s17.add(new DistanceTo("charleston", 2));
s17.add(new DistanceTo("miami", 5));
s17.add(new DistanceTo("raleigh", 2));
s17.add(new DistanceTo("new orleans", 4));
cities.put("atlanta", s17);

s18.add(new DistanceTo("pittsburg", 2));
s18.add(new DistanceTo("raleigh", 2));
s18.add(new DistanceTo("new york", 2));
cities.put("washington", s18);

s19.add(new DistanceTo("boston", 2));
s19.add(new DistanceTo("pittsburg", 2));
s19.add(new DistanceTo("montreal", 2));
s19.add(new DistanceTo("washington", 2));
cities.put("new york", s19);

s20.add(new DistanceTo("boston", 2));
s20.add(new DistanceTo("toronto", 3));
s20.add(new DistanceTo("new york", 3));
s20.add(new DistanceTo("sault ste. marie", 2));
cities.put("montreal", s20);

s21.add(new DistanceTo("duluth", 4));
s21.add(new DistanceTo("sault ste. marie", 6));
s21.add(new DistanceTo("calgary", 6));
s21.add(new DistanceTo("helena", 4));
cities.put("winnipeg", s21);

s22.add(new DistanceTo("seattle", 6));
s22.add(new DistanceTo("salt lake city", 3 ));
s22.add(new DistanceTo("calgary", 4));
s22.add(new DistanceTo("winnipeg", 4 ));
s22.add(new DistanceTo("denver", 4));
s22.add(new DistanceTo("omaha", 5));
s22.add(new DistanceTo("duluth", 6 ));
cities.put("helena", s22);

s23.add(new DistanceTo("saint louis", 2));
s23.add(new DistanceTo("omaha", 4));
s23.add(new DistanceTo("duluth", 3));
s23.add(new DistanceTo("toronto", 4));
s23.add(new DistanceTo("pittsburg", 3));
cities.put("chicago", s23);

s24.add(new DistanceTo("duluth", 2));
s24.add(new DistanceTo("helena", 5));
s24.add(new DistanceTo("denver", 4));
s24.add(new DistanceTo("chicago", 4));
s24.add(new DistanceTo("kansas city", 1));
cities.put("omaha", s24);

s25.add(new DistanceTo("san francisco", 5));
s25.add(new DistanceTo("portland", 6));
s25.add(new DistanceTo("helena", 3));
s25.add(new DistanceTo("denver", 3));
s25.add(new DistanceTo("las vegas", 3));
cities.put("salt lake city", s25);

s26.add(new DistanceTo("dallas", 2));
s26.add(new DistanceTo("saint louis", 2));
s26.add(new DistanceTo("new orleans", 3));
s26.add(new DistanceTo("nashville", 3));
s26.add(new DistanceTo("oklahoma city", 2));
cities.put("little rock", s26);

s27.add(new DistanceTo("pittsburg", 2));
s27.add(new DistanceTo("sault ste. marie", 2));
s27.add(new DistanceTo("chicago", 4));
s27.add(new DistanceTo("duluth", 6));
s27.add(new DistanceTo("montreal", 3));
cities.put("toronto", s27);

s28.add(new DistanceTo("oklahoma city", 2));
s28.add(new DistanceTo("el paso", 4));
s28.add(new DistanceTo("little rock", 2));
s28.add(new DistanceTo("houston", 1));
cities.put("dallas", s28);

s29.add(new DistanceTo("new york", 2));
s29.add(new DistanceTo("montreal", 2));
cities.put("boston", s29);

s30.add(new DistanceTo("toronto", 2));
s30.add(new DistanceTo("washington", 2));
s30.add(new DistanceTo("new york", 2));
s30.add(new DistanceTo("chicago", 3));
s30.add(new DistanceTo("raleigh", 2));
s30.add(new DistanceTo("saint louis", 5));
cities.put("pittsburg", s30);

s31.add(new DistanceTo("helena", 6));
s31.add(new DistanceTo("winnipeg", 4));
s31.add(new DistanceTo("omaha", 2));
s31.add(new DistanceTo("chicago", 3));
s31.add(new DistanceTo("toronto", 6));
s31.add(new DistanceTo("sault ste. marie", 3));
cities.put("duluth", s31);

s32.add(new DistanceTo("atlanta", 1));
s32.add(new DistanceTo("pittsburg", 4));
s32.add(new DistanceTo("raleigh", 3));
s32.add(new DistanceTo("saint louis", 2));
s32.add(new DistanceTo("little rock", 3));
cities.put("nashville", s32);

s33.add(new DistanceTo("kansas city", 2));
s33.add(new DistanceTo("little rock", 2));
s33.add(new DistanceTo("chicago", 2));
s33.add(new DistanceTo("nashville", 2));
s33.add(new DistanceTo("pittsburg", 5));
cities.put("saint louis", s33);

s34.add(new DistanceTo("toronto", 2));
s34.add(new DistanceTo("montreal", 5));
s34.add(new DistanceTo("duluth", 2));
s34.add(new DistanceTo("winnipeg", 5));
cities.put("sault ste. marie", s34);

s35.add(new DistanceTo("saint louis", 2));
s35.add(new DistanceTo("omaha", 1));
s35.add(new DistanceTo("denver", 4));
s35.add(new DistanceTo("oklahoma city", 2));
cities.put("kansas city", s35);

s36.add(new DistanceTo("kansas city", 2));
s36.add(new DistanceTo("santa fe", 3));
s36.add(new DistanceTo("dallas", 2));
s36.add(new DistanceTo("el paso", 5));
s36.add(new DistanceTo("little rock", 2));
s36.add(new DistanceTo("denver", 4));
cities.put("oklahoma city", s36);
}

}

I get two errors and a bunch of warnings. Not the best at coding and am pretty much burnt out. Have been using DrJava for my course. Any help would be appreciated, java geniuses.

My errors
2 errors and 241 warnings found:
--------------
*** Errors ***
--------------
File: C:\Users\shikh\Desktop\Route.java [line: 47]
Error: Type mismatch: cannot convert from java.lang.Object to DistanceTo
File: C:\Users\shikh\Desktop\Route.java [line: 68]
Error: Type mismatch: cannot convert from element type java.lang.Object to DistanceTo
--------------
** Warnings **
--------------
File: C:\Users\shikh\Desktop\Route.java [line: 12]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 12]
Warning: Type safety: The expression of type java.util.HashMap needs unchecked conversion to conform to java.util.Map<java.lang.String,java.util.TreeSet>
File: C:\Users\shikh\Desktop\Route.java [line: 12]
Warning: java.util.HashMap is a raw type. References to generic type java.util.HashMap<K,V> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 26]
Warning: java.util.PriorityQueue is a raw type. References to generic type java.util.PriorityQueue<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 26]
Warning: java.util.PriorityQueue is a raw type. References to generic type java.util.PriorityQueue<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 27]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.PriorityQueue. References to generic type java.util.PriorityQueue<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 31]
Warning: java.util.Map is a raw type. References to generic type java.util.Map<K,V> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 31]
Warning: java.util.HashMap is a raw type. References to generic type java.util.HashMap<K,V> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 36]
Warning: java.util.ArrayList is a raw type. References to generic type java.util.ArrayList<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 36]
Warning: java.util.ArrayList is a raw type. References to generic type java.util.ArrayList<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 49]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.ArrayList. References to generic type java.util.ArrayList<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 62]
Warning: Type safety: The method put(java.lang.Object, java.lang.Object) belongs to the raw type java.util.Map. References to generic type java.util.Map<K,V> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 65]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 66]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 77]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.PriorityQueue. References to generic type java.util.PriorityQueue<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 94]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 94]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 95]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 95]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 96]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 96]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 97]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 97]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 98]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 98]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 99]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 99]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 100]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 100]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 101]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 101]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 102]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 102]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 103]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 103]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 104]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 104]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 105]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 105]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 106]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 106]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 107]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 107]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 108]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 108]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 109]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 109]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 110]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 110]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 111]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 111]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 112]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 112]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 113]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 113]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 114]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 114]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 115]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 115]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 116]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 116]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 117]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 117]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 118]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 118]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 119]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 119]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 120]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 120]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 121]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 121]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 122]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 122]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 123]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 123]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 124]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 124]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 125]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 125]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 126]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 126]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 127]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 127]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 128]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 128]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 129]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 129]
Warning: java.util.TreeSet is a raw type. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 132]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 133]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 136]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 137]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 140]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 141]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 142]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 143]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 146]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 147]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 148]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 151]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 152]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 153]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 156]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 157]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 158]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 159]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 162]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 163]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 164]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 165]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 166]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 167]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 170]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 171]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 172]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 173]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 176]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 177]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 180]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 181]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 182]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 183]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 184]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 187]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 188]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 189]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 190]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 191]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 192]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 193]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 198]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 199]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 200]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 204]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 205]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 206]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 207]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 211]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 212]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 213]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 216]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 217]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 218]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 221]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 222]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 223]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 224]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 225]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 228]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 229]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 230]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 231]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 232]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 235]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 236]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 237]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 240]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 241]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 242]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 243]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 246]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 247]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 248]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 249]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 252]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 253]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 254]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 255]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 258]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 259]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 260]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 261]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 262]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 263]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 264]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 267]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 268]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 269]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 270]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 271]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 274]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 275]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 276]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 277]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 278]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 281]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 282]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 283]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 284]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 285]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 288]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 289]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 290]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 291]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 292]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 295]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 296]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 297]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 298]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 299]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 302]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 303]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 304]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 305]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 308]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 309]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 312]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 313]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 314]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 315]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 316]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 317]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 320]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 321]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 322]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 323]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 324]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 325]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 328]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 329]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 330]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 331]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 332]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 335]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 336]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 337]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 338]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 339]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 342]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 343]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 344]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 345]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 348]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 349]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 350]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 351]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 354]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 355]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 356]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 357]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 358]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized
File: C:\Users\shikh\Desktop\Route.java [line: 359]
Warning: Type safety: The method add(java.lang.Object) belongs to the raw type java.util.TreeSet. References to generic type java.util.TreeSet<E> should be parameterized

OP
Member
anyone?

#### Quantumcat

##### Dead and alive
Member
Just from the errors and warnings, you need to tell TreeSet what sort of object to hold.

TreeSet<DistanceTo> s1 = new TreeSet<DistanceTo>();

Or if using Java 8 you can write it more concisely:

TreeSet<DistanceTo> s1 = new TreeSet<>();

You could also make it a bit shorter by initialising the TreeSets with arrays rather than add the elements one at a time, and add them directly rather than have unnecessary variables that you don't refer to ever again. It is easier to read and follow that way.

For example you could say

DistanceTo[] list = {new DistanceTo("Seattle", 1), new DistanceTo("Calgary", 3)};

cities.put("Vancouver", new TreeSet<DistanceTo>(list));

Or even better

cities.put("Vancouver", new TreeSet<DistanceTo>(Arrays.asList(new DistanceTo>[]{new DistanceTo("Seattle", 1), new DistanceTo("Calgary", 3)}));

Because that avoids the useless variable "list". (You may want to check the correct closing brackets etc if I missed any, I didn't actually try running this).

Your assignment also says you need to be able to accept the input from a text file (I'm assuming), so you may be wasting your time inputting it all manually like this. If you want any more help let me know

Edit: if you want a code snippet for reading from a file let me know. I can give you hints for putting the data into cities (trying not to do the assignment for you of course).

Last edited by Quantumcat,

#### Yil

##### Well-Known Member
Member
Do you know slack based shortest path Algorithm?
Edit: Also as crazy as it sounds do not use trees.

Last edited by Yil,

Replies
10
Views
2K
Replies
0
Views
177
Replies
3
Views
3K
Replies
4
Views
457
Replies
22
Views
7K

1. 32K views

### Super Mario RPG has leaked online

To little surprise, Super Mario RPG has leaked a week ahead of its scheduled release date. Pinned for a November 17th retail release date, the game has already been...
2. 27K views

### Hacking PS5 commercial backups are now booting on jailbroken systems

1721713975929209075 PlayStation 5 homebrew scene modder @LightningMods_ has shown the first commercial PS5 games running on their jailbroken console with console...
3. 17K views

### New romhack website "Romhacks.org" is now open for public hack submissions

Over several decades, romhacking and everything else related to it, like fan translation projects, mild graphical modifications to existing games and other...
4. 15K views

### Valve announces new OLED Steam Decks with up to 1TB internal storage and some hardware revisions

Valve has announced today a new revision for their hybrid console, the Steam Deck, with HDR OLED screens, more internal storage and way better hardware than the...
5. 14K views

### First trailer for "the next" Grand Theft Auto to arrive early December [UPDATE]

According to a new Bloomberg report, Rockstar will announce the next installment in the Grand Theft Auto franchise as early as this week. The report further mentions...
6. 13K views

### Gaming ‘Legend of Zelda’ Movie in the Works

As reported on by "The Hollywood Reporter" a live action adaptation of The Legend of Zelda is in the works. Being produced by Nintendo and Arad Productions and being...
7. 13K views

### AYANEO announces new REMAKE line of devices, includes AYANEO FLIP DS, mini PCs and retro handheld

During a livestream today, AYANEO, the company known to make handheld gaming PCs, has announced a new line of products: the AYANEO REMAKE. Included within this line...
8. 13K views

### Sony is facing a 7.9 billion lawsuit by the London Tribunal over PlayStation Store prices

Back on 2022, Sony received a lawsuit from consumer advocate Alex Neill of the United Kingdom, on behalf of 9+ million users in the region, with the claim that Sony...
9. 11K views

### Valve celebrates Half-Life's 25th Anniversary offering Half-Life 1 for free with brand new content and other discounts on Steam

The legendary influential and era defining first person shooter, Half-Life, is celebrating its 25th Anniversary today, and to commemorate the occasion, Valve has...
10. 10K views

### Steam's new currency change for Argentina and Turkey created a big price increase for certain games

Steam announced the highly volatile exchange rate going on with both Argentina's peso and Turkey's lira makes it hard for game developers to keep an appropriate and...
1. 175 replies

### Super Mario RPG has leaked online

To little surprise, Super Mario RPG has leaked a week ahead of its scheduled release date. Pinned for a November 17th retail release date, the game has already been...
2. 124 replies

### Hacking PS5 commercial backups are now booting on jailbroken systems

1721713975929209075 PlayStation 5 homebrew scene modder @LightningMods_ has shown the first commercial PS5 games running on their jailbroken console with console...
3. 104 replies

### Sony is facing a 7.9 billion lawsuit by the London Tribunal over PlayStation Store prices

Back on 2022, Sony received a lawsuit from consumer advocate Alex Neill of the United Kingdom, on behalf of 9+ million users in the region, with the claim that Sony...
4. 94 replies

### Grand Theft Auto VI's first trailer confirms 2025 release date

Rockstar has changed the upload time for the teaser of Grand Theft Auto VI. Originally scheduled to go live tomorrow, the video was leaked early, with Rockstar...
5. 91 replies

### Gaming ‘Legend of Zelda’ Movie in the Works

As reported on by "The Hollywood Reporter" a live action adaptation of The Legend of Zelda is in the works. Being produced by Nintendo and Arad Productions and being...
6. 91 replies

### Valve announces new OLED Steam Decks with up to 1TB internal storage and some hardware revisions

Valve has announced today a new revision for their hybrid console, the Steam Deck, with HDR OLED screens, more internal storage and way better hardware than the...
7. 78 replies

### New romhack website "Romhacks.org" is now open for public hack submissions

Over several decades, romhacking and everything else related to it, like fan translation projects, mild graphical modifications to existing games and other...
8. 74 replies

### Steam's new currency change for Argentina and Turkey created a big price increase for certain games

Steam announced the highly volatile exchange rate going on with both Argentina's peso and Turkey's lira makes it hard for game developers to keep an appropriate and...
9. 70 replies

### First trailer for "the next" Grand Theft Auto to arrive early December [UPDATE]

According to a new Bloomberg report, Rockstar will announce the next installment in the Grand Theft Auto franchise as early as this week. The report further mentions...
10. 56 replies

### Pendulo Studios apologise for state of Tintin game ahead of launch

On the day of the games launch, the studio behind Tintin Reporter - Cigars of the Pharaoh, Pendulo Studios; have issued an apology via their Twitter which states that...

## Online Data Storage: Asking for recommendations

### Recent Content

12. #### SylverReZ-branded R4 cards go up for sale on AliExpress

Help Users
• @ YukiHomura:
My grandpa in turkish: I didnt knew that you can buy food in a
• @ YukiHomura:
Buy food and go to toilet same time
• @ reha:
"aynı anda bir yerden hem yemek alınabileceğini hem de sıçılabileceğini
bilmiyordum"
• @ reha:
wise words indeed
• @ YukiHomura:
Exactly that
• @ reha:
anyways... i think i'll just finish the studying as quickly as possible then go the sleep... i have school at 7:45am... (wish me luck) it was nice talking to you ma'am
• @ reha:
dont mind the grammar mistakes
• @ YukiHomura:
Good luck. I go sleep now
• @ YukiHomura:
Or in turkish Iyi Geceler
• @ BigOnYa:
Game awards on now, live
• @ Psionic Roshambo:
Hopefully Mario wins an award best plumber in video games or something
• @ BigOnYa:
Wonder won one already
• @ GalacticWarsHalloween2023:
Ironmouse won content creator??? This is invalid and I won't accept how a VTuber would win TGA (I support Raylife, the company that eliminates vtubers, and I am the founder of the company)
+1
• @ K3N1:
Gta 6 already won 12 awards
+1
• @ Sicklyboy:
Think I'm finally gonna install my hwfly modchip on my Switch OLED soon
• @ GalacticWarsHalloween2023:
"Ironmouse, you're next! let's see if you can stop you evil kind."
• @ Psionic Roshambo:
Hmmm Hyperscan was in the XBox 360/PS3/Wii generation.... I guess the Wii wasn't the weakest lol
• @ GalacticWarsHalloween2023:
Hyperscan The console that uses cards
+2
• @ BigOnYa:
cant believe that nickolodeon fighter game was nominated for best fighting game of the year. lol
• @ K3N1:
Bring back arcade carts
• @ FlareReZ:
@K3N1, Hopefully lets not get the suicide battery in em.
• @ K3N1:
I feel asleep to MJs song the girl is mine then I woke up like wait a minute mj how old was she
+1
@ K3N1: I feel asleep to MJs song the girl is mine then I woke up like wait a minute mj how old was she +1