Take out getPlaceholderVertexValue into a private static method. Not specific to vertex object.
@@ -52,11 +52,12 @@ public class LogProbGraph {
}
private interface PlaceholderVertex<T> {
- default T getPlaceholderVertexValue(Vertex<T> vertex) {
+ }
+
+ private static <T> T getPlaceholderVertexValue(Vertex<T> vertex) {
if (!vertex.hasValue()) {
throw new IllegalStateException("Cannot get value because PlaceholderVertex has not been initialized.");
}
return vertex.getValue();
}
}
-}
