/** * {@inheritDoc} * * @see java.util.NavigableSet#descendingIterator() * @since 1.6 */ public Iterator<E> descendingIterator() { return descendingSet().iterator(); }
private List<Long> loadIdsFromHistory(Map<CaseInsensitiveString, TreeSet<Long>> result) { List<Long> idsForHistory = new ArrayList<Long>(); try { activePipelineReadLock.lock(); for (Map.Entry<CaseInsensitiveString, TreeSet<Long>> pipelineToIds : result.entrySet()) { idsForHistory.addAll(pipelineToIds.getValue().descendingSet()); } } finally { activePipelineReadLock.unlock(); } return idsForHistory; }
@Override public NavigableSet<E> descendingSet() { return set().descendingSet(); }
/** * Removes a number of merged regions of cells (hence letting them free) * * @param indices A set of the regions to unmerge */ @Override public void removeMergedRegions(Collection<Integer> indices) { for (int i : (new TreeSet<>(indices)).descendingSet()) { _sheet.removeMergedRegion(i); } }
return F.t(min, max); // Short path. for (Long idx : archiveIndices.descendingSet()) { if (!archiveIndices.contains(idx - 1)) return F.t(idx, max);
for (Pair<Double,String> pair : sortedLabels.descendingSet()) { if (builder.length() > 0) { builder.append('\t');
.descendingSet()) { if (this.comparator.compare(dropCandidate.getT(), newElement.getT()) <= 0) { log.debug("Cannot evict enough requests to fit request {}. " + "Rejecting", newElement.getT());
private NavigableSet<LogLevel> getLevels() { Set<LogLevel> levels = this.loggingSystem.getSupportedLogLevels(); return new TreeSet<>(levels).descendingSet(); }
/** * @param histogram a histogram that represents the frequencies of tags */ public void optimizeWayOrdering(TShortIntHashMap histogram) { this.optimizedWayIds.clear(); final TreeSet<HistogramEntry> wayOrdering = new TreeSet<>(); histogram.forEachEntry(new TShortIntProcedure() { @Override public boolean execute(short tag, int amount) { wayOrdering.add(new HistogramEntry(tag, amount)); return true; } }); short tmpWayID = 0; OSMTag currentTag = null; for (HistogramEntry histogramEntry : wayOrdering.descendingSet()) { currentTag = this.idToWayTag.get(Short.valueOf(histogramEntry.id)); this.optimizedWayIds.put(Short.valueOf(histogramEntry.id), Short.valueOf(tmpWayID)); LOGGER.finer("adding way tag: " + currentTag.tagKey() + " id:" + tmpWayID + " amount: " + histogramEntry.amount); tmpWayID++; } }
/** * @param histogram a histogram that represents the frequencies of tags */ public void optimizePoiOrdering(TShortIntHashMap histogram) { this.optimizedPoiIds.clear(); final TreeSet<HistogramEntry> poiOrdering = new TreeSet<>(); histogram.forEachEntry(new TShortIntProcedure() { @Override public boolean execute(short tag, int amount) { poiOrdering.add(new HistogramEntry(tag, amount)); return true; } }); short tmpPoiID = 0; OSMTag currentTag = null; for (HistogramEntry histogramEntry : poiOrdering.descendingSet()) { currentTag = this.idToPoiTag.get(Short.valueOf(histogramEntry.id)); this.optimizedPoiIds.put(Short.valueOf(histogramEntry.id), Short.valueOf(tmpPoiID)); LOGGER.finer("adding poi tag: " + currentTag.tagKey() + " id:" + tmpPoiID + " amount: " + histogramEntry.amount); tmpPoiID++; } }
@Override public NavigableSet<E> descendingSet() { NavigableSet<E> descendingSet = super.descendingSet(); return new UnmodifiableTreeSet<>(descendingSet.comparator(), descendingSet); }
/** * {@inheritDoc} * * @see java.util.NavigableSet#descendingIterator() * @since 1.6 */ public Iterator<E> descendingIterator() { return descendingSet().iterator(); }
/** * {@inheritDoc} * * @see java.util.NavigableSet#descendingIterator() * @since 1.6 */ public Iterator<E> descendingIterator() { return descendingSet().iterator(); }
@Override public Page<TaskExecution> findAll(Pageable pageable) { TreeSet<TaskExecution> sortedSet = getTaskExecutionTreeSet(); sortedSet.addAll(taskExecutions.values()); List<TaskExecution> result = new ArrayList<>(sortedSet.descendingSet()); return getPageFromList(result, pageable, getTaskExecutionCount()); }
/** * Make a warnings guard that's the same as this one but demotes all * errors to warnings. */ ComposeWarningsGuard makeEmergencyFailSafeGuard() { ComposeWarningsGuard safeGuard = new ComposeWarningsGuard(); safeGuard.demoteErrors = true; for (WarningsGuard guard : guards.descendingSet()) { safeGuard.addGuard(guard); } return safeGuard; }
@Override public NavigableSet descendingSet() { if (!_directAccess && isDelayLoad()) { load(); } return super.descendingSet(); }
/** * Make a warnings guard that's the same as this one but demotes all * errors to warnings. */ ComposeWarningsGuard makeEmergencyFailSafeGuard() { ComposeWarningsGuard safeGuard = new ComposeWarningsGuard(); safeGuard.demoteErrors = true; for (WarningsGuard guard : guards.descendingSet()) { safeGuard.addGuard(guard); } return safeGuard; }
@Override public NavigableSet<E> descendingSet() { NavigableSet<E> descendingSet = super.descendingSet(); return new UnmodifiableTreeSet<>(descendingSet.comparator(), descendingSet); }
@Override protected ComposeWarningsGuard makeNonStrict() { ComposeWarningsGuard nonStrictGuard = new ComposeWarningsGuard(); for (WarningsGuard guard : guards.descendingSet()) { if (!(guard instanceof StrictWarningsGuard)) { nonStrictGuard.addGuard(guard.makeNonStrict()); } } return nonStrictGuard; }
@Override protected ComposeWarningsGuard makeNonStrict() { ComposeWarningsGuard nonStrictGuard = new ComposeWarningsGuard(); for (WarningsGuard guard : guards.descendingSet()) { if (!(guard instanceof StrictWarningsGuard)) { nonStrictGuard.addGuard(guard.makeNonStrict()); } } return nonStrictGuard; }