tom

Fixed check-style nags.

......@@ -21,7 +21,8 @@ public class BreadthFirstSearch<V extends Vertex, E extends Edge<V>>
result.costs.put(src, 0.0);
frontier.add(src);
search: while (!frontier.isEmpty()) {
search:
while (!frontier.isEmpty()) {
// Prepare the next frontier.
Set<V> next = new HashSet<>();
......@@ -38,8 +39,9 @@ public class BreadthFirstSearch<V extends Vertex, E extends Edge<V>>
cost + (ew == null ? 1.0 : ew.weight(edge)),
true);
// If we have reached our intended destination, bail.
if (nextVertex.equals(dst))
if (nextVertex.equals(dst)) {
break search;
}
next.add(nextVertex);
}
}
......
package org.onlab.graph;
import com.google.common.collect.ImmutableList;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import java.util.Iterator;
import java.util.List;
import static com.google.common.collect.ImmutableList.of;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
......
package org.onlab.graph;
import com.google.common.collect.ImmutableList;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
......@@ -8,7 +7,6 @@ import java.util.List;
import static com.google.common.collect.ImmutableList.of;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
/**
* Test of the default path.
......
package org.onlab.graph;
import com.google.common.collect.ImmutableSet;
import java.util.Set;
import static com.google.common.collect.ImmutableSet.of;
......
package org.onlab.graph;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Ordering;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Iterator;
import static com.google.common.collect.ImmutableList.of;
import static org.junit.Assert.*;
......
......@@ -2,8 +2,6 @@ package org.onlab.graph;
import java.util.Objects;
import static com.google.common.base.Objects.toStringHelper;
/**
* Test vertex.
*/
......