Refine search
/** * @return First checkpoint entry if exists. Otherwise {@code null}. */ public CheckpointEntry firstCheckpoint() { Map.Entry<Long,CheckpointEntry> entry = histMap.firstEntry(); return entry != null ? entry.getValue() : null; }
@Override public Cell first() { return this.delegatee.firstEntry().getValue(); }
@Override public Range<C> span() { Entry<Cut<C>, Range<C>> firstEntry = rangesByLowerBound.firstEntry(); Entry<Cut<C>, Range<C>> lastEntry = rangesByLowerBound.lastEntry(); if (firstEntry == null) { throw new NoSuchElementException(); } return Range.create(firstEntry.getValue().lowerBound, lastEntry.getValue().upperBound); }
public A getBottomTweet() { synchronized (posts) { return this.posts.firstEntry().getValue(); } }
public TimelineObjectHolder<VersionType, ObjectType> first() { try { lock.readLock().lock(); return timelineEntryToObjectHolder(completePartitionsTimeline.firstEntry().getValue()); } finally { lock.readLock().unlock(); } }
public Range getSpan() { if (lowIndexedRanges.isEmpty()) { throw new IllegalStateException("Can not get span if no ranges exist"); } return lowIndexedRanges.firstEntry().getValue().span(lowIndexedRanges.lastEntry().getValue()); }
public Range getSpan() { if (lowIndexedRanges.isEmpty()) { throw new IllegalStateException("Can not get span if no ranges exist"); } return lowIndexedRanges.firstEntry().getValue().span(lowIndexedRanges.lastEntry().getValue()); }
@Override public Range<C> span() { Entry<Cut<C>, Range<C>> firstEntry = rangesByLowerBound.firstEntry(); Entry<Cut<C>, Range<C>> lastEntry = rangesByLowerBound.lastEntry(); if (firstEntry == null) { throw new NoSuchElementException(); } return Range.create(firstEntry.getValue().lowerBound, lastEntry.getValue().upperBound); }
@Override public Range<K> span() { Entry<Cut<K>, RangeMapEntry<K, V>> firstEntry = entriesByLowerBound.firstEntry(); Entry<Cut<K>, RangeMapEntry<K, V>> lastEntry = entriesByLowerBound.lastEntry(); if (firstEntry == null) { throw new NoSuchElementException(); } return Range.create( firstEntry.getValue().getKey().lowerBound, lastEntry.getValue().getKey().upperBound); }
@Override public Range<C> span() { Entry<Cut<C>, Range<C>> firstEntry = rangesByLowerBound.firstEntry(); Entry<Cut<C>, Range<C>> lastEntry = rangesByLowerBound.lastEntry(); if (firstEntry == null) { throw new NoSuchElementException(); } return Range.create(firstEntry.getValue().lowerBound, lastEntry.getValue().upperBound); }
/** * Returns the first segment in the log. * * @throws IllegalStateException if the segment manager is not open */ JournalSegment<E> getFirstSegment() { assertOpen(); Map.Entry<Long, JournalSegment<E>> segment = segments.firstEntry(); return segment != null ? segment.getValue() : null; }
/** * Get an iterator that we can use to iterate throw all the global storage * statistics objects. */ synchronized public Iterator<StorageStatistics> iterator() { Entry<String, StorageStatistics> first = map.firstEntry(); return new StorageIterator((first == null) ? null : first.getValue()); }
/** * Builds the DT model by the given sorted map of nodes. * * @param nodes The sorted map of nodes. */ private static DecisionTreeNode buildDecisionTreeModel(Map<Integer, NodeData> nodes) { DecisionTreeNode mdl = null; if (!nodes.isEmpty()) { NodeData rootNodeData = (NodeData)((NavigableMap)nodes).firstEntry().getValue(); mdl = buildTree(nodes, rootNodeData); return mdl; } return mdl; }
@Override public @Nullable Range<C> get(Object key) { if (key instanceof Cut) { try { @SuppressWarnings("unchecked") Cut<C> cut = (Cut<C>) key; // tailMap respects the current window Entry<Cut<C>, Range<C>> firstEntry = tailMap(cut, true).firstEntry(); if (firstEntry != null && firstEntry.getKey().equals(cut)) { return firstEntry.getValue(); } } catch (ClassCastException e) { return null; } } return null; }
@Override public boolean tryAdvance(Consumer<? super TrackedEventMessage<?>> action) { Map.Entry<TrackingToken, TrackedEventMessage<?>> next; if (lastToken != null) { next = source.higherEntry(lastToken); } else { next = source.firstEntry(); } if (next != null) { lastToken = next.getKey(); action.accept(next.getValue()); } return next != null; } }
@Override public Range<C> span() { Entry<Cut<C>, Range<C>> firstEntry = rangesByLowerBound.firstEntry(); Entry<Cut<C>, Range<C>> lastEntry = rangesByLowerBound.lastEntry(); if (firstEntry == null) { throw new NoSuchElementException(); } return Range.create(firstEntry.getValue().lowerBound, lastEntry.getValue().upperBound); }
@Override public Range<K> span() { Entry<Cut<K>, RangeMapEntry<K, V>> firstEntry = entriesByLowerBound.firstEntry(); Entry<Cut<K>, RangeMapEntry<K, V>> lastEntry = entriesByLowerBound.lastEntry(); if (firstEntry == null) { throw new NoSuchElementException(); } return Range.create( firstEntry.getValue().getKey().lowerBound, lastEntry.getValue().getKey().upperBound); }
/** */ private synchronized void advance() throws IgniteCheckedException { if (fullIterators.isEmpty()) reachedEnd = true; while (!reachedEnd && (current == null || !current.getValue().hasNextX() || missingParts.contains(current.getKey()))) { if (current == null) current = fullIterators.firstEntry(); else { current = fullIterators.ceilingEntry(current.getKey() + 1); if (current == null) reachedEnd = true; } } assert current != null || reachedEnd; }
@Override public Range<K> span() { Entry<Cut<K>, RangeMapEntry<K, V>> firstEntry = entriesByLowerBound.firstEntry(); Entry<Cut<K>, RangeMapEntry<K, V>> lastEntry = entriesByLowerBound.lastEntry(); if (firstEntry == null) { throw new NoSuchElementException(); } return Range.create( firstEntry.getValue().getKey().lowerBound, lastEntry.getValue().getKey().upperBound); }
@Override @NullableDecl public Range<C> get(Object key) { if (key instanceof Cut) { try { @SuppressWarnings("unchecked") Cut<C> cut = (Cut<C>) key; // tailMap respects the current window Entry<Cut<C>, Range<C>> firstEntry = tailMap(cut, true).firstEntry(); if (firstEntry != null && firstEntry.getKey().equals(cut)) { return firstEntry.getValue(); } } catch (ClassCastException e) { return null; } } return null; }