Commit dce26bc0 authored by trh010's avatar trh010
Browse files

added adjacencyNode

parent ef40e7ba
......@@ -4,10 +4,10 @@ import java.util.ArrayList;
public class AdjacencyList {
private ArrayList<ArrayList<String>> adjList;
private ArrayList<ArrayList<AdjacencyNode>> adjList;
public AdjacencyList() {
adjList = new ArrayList<ArrayList<String>>();
adjList = new ArrayList<ArrayList<AdjacencyNode>>();
}
public void addNode(String newWord) {
......
package main;
public class AdjacencyNode {
private String word;
private int handle;
public AdjacencyNode(String word, int handle) {
this.word = word;
this.handle = handle;
}
public int getHandle() {
return handle;
}
public void setHandle(int handle) {
this.handle = handle;
}
public String getWord() {
return word;
}
}
......@@ -39,13 +39,12 @@ public class Main {
* Main method. Runs the program from the given input file
*
* @param args
* the input file path
* the input file path, best to use the absolute file path
*/
public static void main(String[] args) {
try {
Main main = new Main();
main.createGraph(args[0]);
} catch (Exception e) {
System.err.println("Error! - " + e.toString());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment