* get from this node to any other node.
*/
-public class PathFinder {
+class PathFinder {
private ArrayList<String> errors = new ArrayList<>();
private HashMap<String, String> routes = new HashMap<>();
* @param nodes where we can go
* @param hops detours along the way
*/
- public PathFinder(String origin, String[] nodes, NodeConfig.ProvHop[] hops) {
+ PathFinder(String origin, String[] nodes, NodeConfig.ProvHop[] hops) {
HashSet<String> known = new HashSet<>();
HashMap<String, HashMap<String, Hop>> ht = new HashMap<>();
for (String n : nodes) {
*
* @return array of error descriptions
*/
- public String[] getErrors() {
- return (errors.toArray(new String[errors.size()]));
+ String[] getErrors() {
+ return (errors.toArray(new String[0]));
}
/**
* @param destination node
* @return list of node names separated by and ending with "/"
*/
- public String getPath(String destination) {
+ String getPath(String destination) {
String ret = routes.get(destination);
if (ret == null) {
return ("");