@Test public void testGetMinNull() { GraphStore graphStore = new GraphStore(); TimeStore store = new TimeStore(graphStore, null, true); Assert.assertEquals(store.getMin(graphStore), Double.NEGATIVE_INFINITY); }
public double getMin(Graph graph) { if (nodeIndexStore == null || edgeIndexStore == null) { return Double.NEGATIVE_INFINITY; } double nodeMin = nodeIndexStore.getIndex(graph).getMinTimestamp(); double edgeMin = edgeIndexStore.getIndex(graph).getMinTimestamp(); if (Double.isInfinite(nodeMin)) { return edgeMin; } if (Double.isInfinite(edgeMin)) { return nodeMin; } return Math.min(nodeMin, edgeMin); }
TimeStore { public double getMin(Graph graph) { if (nodeIndexStore == null || edgeIndexStore == null) { return Double.NEGATIVE_INFINITY; } double nodeMin = nodeIndexStore.getIndex(graph).getMinTimestamp(); double edgeMin = edgeIndexStore.getIndex(graph).getMinTimestamp(); if (Double.isInfinite(nodeMin)) { return edgeMin; } if (Double.isInfinite(edgeMin)) { return nodeMin; } return Math.min(nodeMin, edgeMin); } }
TimeStore { public double getMin(Graph graph) { if (nodeIndexStore == null || edgeIndexStore == null) { return Double.NEGATIVE_INFINITY; } double nodeMin = nodeIndexStore.getIndex(graph).getMinTimestamp(); double edgeMin = edgeIndexStore.getIndex(graph).getMinTimestamp(); if (Double.isInfinite(nodeMin)) { return edgeMin; } if (Double.isInfinite(edgeMin)) { return nodeMin; } return Math.min(nodeMin, edgeMin); } TimeStore(GraphStore store, GraphLock graphLock, boolean indexed); }
TimeStore { public double getMin(Graph graph) { if (nodeIndexStore == null || edgeIndexStore == null) { return Double.NEGATIVE_INFINITY; } double nodeMin = nodeIndexStore.getIndex(graph).getMinTimestamp(); double edgeMin = edgeIndexStore.getIndex(graph).getMinTimestamp(); if (Double.isInfinite(nodeMin)) { return edgeMin; } if (Double.isInfinite(edgeMin)) { return nodeMin; } return Math.min(nodeMin, edgeMin); } TimeStore(GraphStore store, GraphLock graphLock, boolean indexed); double getMin(Graph graph); double getMax(Graph graph); boolean isEmpty(); void clear(); void clearEdges(); int deepHashCode(); boolean deepEquals(TimeStore obj); }
TimeStore { public double getMin(Graph graph) { if (nodeIndexStore == null || edgeIndexStore == null) { return Double.NEGATIVE_INFINITY; } double nodeMin = nodeIndexStore.getIndex(graph).getMinTimestamp(); double edgeMin = edgeIndexStore.getIndex(graph).getMinTimestamp(); if (Double.isInfinite(nodeMin)) { return edgeMin; } if (Double.isInfinite(edgeMin)) { return nodeMin; } return Math.min(nodeMin, edgeMin); } TimeStore(GraphStore store, GraphLock graphLock, boolean indexed); double getMin(Graph graph); double getMax(Graph graph); boolean isEmpty(); void clear(); void clearEdges(); int deepHashCode(); boolean deepEquals(TimeStore obj);  }