@Override public double lastDoubleKey() { return sortedMap.lastDoubleKey(); } /**
@Override public double lastDoubleKey() { synchronized (sync) { return sortedMap.lastDoubleKey(); } } /**
/** * {@inheritDoc} * * @deprecated Please use the corresponding type-specific method instead. */ @Deprecated @Override default Double lastKey() { return Double.valueOf(lastDoubleKey()); } /**
@Override public double getMaxTimestamp() { if (mainIndex) { Double2IntSortedMap sortedMap = (Double2IntSortedMap) timestampIndexStore.timeSortedMap; if (!sortedMap.isEmpty()) { return sortedMap.lastDoubleKey(); } } else { Double2IntSortedMap sortedMap = (Double2IntSortedMap) timestampIndexStore.timeSortedMap; if (!sortedMap.isEmpty()) { ObjectBidirectionalIterator<Double2IntMap.Entry> bi = sortedMap.double2IntEntrySet().iterator(sortedMap .double2IntEntrySet().last()); while (bi.hasPrevious()) { Double2IntMap.Entry entry = bi.previous(); double timestamp = entry.getDoubleKey(); int index = entry.getIntValue(); if (index < timestamps.length) { TimeIndexEntry timestampEntry = timestamps[index]; if (timestampEntry != null) { return timestamp; } } } } } return Double.POSITIVE_INFINITY; }
@Override public double getMaxTimestamp() { if (mainIndex) { Double2IntSortedMap sortedMap = (Double2IntSortedMap) timestampIndexStore.timeSortedMap; if (!sortedMap.isEmpty()) { return sortedMap.lastDoubleKey(); } } else { Double2IntSortedMap sortedMap = (Double2IntSortedMap) timestampIndexStore.timeSortedMap; if (!sortedMap.isEmpty()) { ObjectBidirectionalIterator<Double2IntMap.Entry> bi = sortedMap.double2IntEntrySet().iterator(sortedMap .double2IntEntrySet().last()); while (bi.hasPrevious()) { Double2IntMap.Entry entry = bi.previous(); double timestamp = entry.getDoubleKey(); int index = entry.getIntValue(); if (index < timestamps.length) { TimeIndexEntry timestampEntry = timestamps[index]; if (timestampEntry != null) { return timestamp; } } } } } return Double.POSITIVE_INFINITY; }