@Test public void testGetMaxNull() { GraphStore graphStore = new GraphStore(); TimeStore store = new TimeStore(graphStore, null, true); Assert.assertEquals(store.getMax(graphStore), Double.POSITIVE_INFINITY); }
public double getMax(Graph graph) { if (nodeIndexStore == null || edgeIndexStore == null) { return Double.POSITIVE_INFINITY; } double nodeMax = nodeIndexStore.getIndex(graph).getMaxTimestamp(); double edgeMax = edgeIndexStore.getIndex(graph).getMaxTimestamp(); if (Double.isInfinite(nodeMax)) { return edgeMax; } if (Double.isInfinite(edgeMax)) { return nodeMax; } return Math.max(nodeMax, edgeMax); }
TimeStore { public double getMax(Graph graph) { if (nodeIndexStore == null || edgeIndexStore == null) { return Double.POSITIVE_INFINITY; } double nodeMax = nodeIndexStore.getIndex(graph).getMaxTimestamp(); double edgeMax = edgeIndexStore.getIndex(graph).getMaxTimestamp(); if (Double.isInfinite(nodeMax)) { return edgeMax; } if (Double.isInfinite(edgeMax)) { return nodeMax; } return Math.max(nodeMax, edgeMax); } }
TimeStore { public double getMax(Graph graph) { if (nodeIndexStore == null || edgeIndexStore == null) { return Double.POSITIVE_INFINITY; } double nodeMax = nodeIndexStore.getIndex(graph).getMaxTimestamp(); double edgeMax = edgeIndexStore.getIndex(graph).getMaxTimestamp(); if (Double.isInfinite(nodeMax)) { return edgeMax; } if (Double.isInfinite(edgeMax)) { return nodeMax; } return Math.max(nodeMax, edgeMax); } TimeStore(GraphStore store, GraphLock graphLock, boolean indexed); }
TimeStore { public double getMax(Graph graph) { if (nodeIndexStore == null || edgeIndexStore == null) { return Double.POSITIVE_INFINITY; } double nodeMax = nodeIndexStore.getIndex(graph).getMaxTimestamp(); double edgeMax = edgeIndexStore.getIndex(graph).getMaxTimestamp(); if (Double.isInfinite(nodeMax)) { return edgeMax; } if (Double.isInfinite(edgeMax)) { return nodeMax; } return Math.max(nodeMax, edgeMax); } 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 getMax(Graph graph) { if (nodeIndexStore == null || edgeIndexStore == null) { return Double.POSITIVE_INFINITY; } double nodeMax = nodeIndexStore.getIndex(graph).getMaxTimestamp(); double edgeMax = edgeIndexStore.getIndex(graph).getMaxTimestamp(); if (Double.isInfinite(nodeMax)) { return edgeMax; } if (Double.isInfinite(edgeMax)) { return nodeMax; } return Math.max(nodeMax, edgeMax); } 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);  }