@Override public Collection<Entry<K, V>> entries() { return decorated().entries(); }
@Override public boolean putAll(final MultiValuedMap<? extends K, ? extends V> map) { if (map == null) { throw new NullPointerException("Map must not be null."); } boolean changed = false; for (final Map.Entry<? extends K, ? extends V> entry : map.entries()) { changed |= put(entry.getKey(), entry.getValue()); } return changed; }
/** * Copies all of the mappings from the specified MultiValuedMap to this map. * The effect of this call is equivalent to that of calling * {@link #put(Object,Object) put(k, v)} on this map once for each mapping * from key {@code k} to value {@code v} in the specified map. The * behavior of this operation is undefined if the specified map is modified * while the operation is in progress. * * @param map mappings to be stored in this map, may not be null * @return true if the map changed as a result of this operation * @throws NullPointerException if map is null */ @Override public boolean putAll(final MultiValuedMap<? extends K, ? extends V> map) { if (map == null) { throw new NullPointerException("Map must not be null."); } boolean changed = false; for (final Map.Entry<? extends K, ? extends V> entry : map.entries()) { changed |= put(entry.getKey(), entry.getValue()); } return changed; }
public final void forwardEvent(Event event, Position position, Set<Long> users) { Invocation.Builder requestBuilder = Context.getClient().target(url).request(); if (header != null && !header.isEmpty()) { for (Map.Entry<String, String> entry : splitKeyValues(header, ":").entries()) { requestBuilder = requestBuilder.header(entry.getKey(), entry.getValue()); } } executeRequest(event, position, users, requestBuilder.async()); }
@Override public Collection<Entry<K, V>> entries() { return UnmodifiableCollection.unmodifiableCollection(decorated().entries()); }
public int getNumberOfActiveTasks() { return (int) futures.entries().stream().filter(entry -> !entry.getValue().isDone()).count(); }
public void stop() { // Stop all futures LOGGER.info("Stopping scraper..."); for (Map.Entry<ScraperTask, ScheduledFuture<?>> entry : futures.entries()) { LOGGER.debug("Stopping task {}...", entry.getKey()); entry.getValue().cancel(true); } // Clear the map futures.clear(); }
final MultiValuedMap<String,T> m = (MultiValuedMap<String,T>) r.getBeanField().getFieldValue(bean); if(m != null && !m.isEmpty()) { for(Map.Entry<String,T> entry : m.entries()) { String key = entry.getKey(); if(r.contains(key)) {
private int indexFeatures(AnnotationFS aAnnotation, String aLayer, String aPrefix, Range aRange, int aMtasId) { int mtasId = aMtasId; // Iterate over the features of this layer and index them one-by-one for (AnnotationFeature feature : layerFeatures.get(aAnnotation.getType().getName())) { Optional<FeatureIndexingSupport> fis = featureIndexingSupportRegistry .getIndexingSupport(feature); if (fis.isPresent()) { MultiValuedMap<String, String> fieldsAndValues = fis.get() .indexFeatureValue(aLayer, aAnnotation, aPrefix, feature); for (Entry<String, String> e : fieldsAndValues.entries()) { indexFeatureValue(e.getKey(), e.getValue(), mtasId++, aAnnotation.getBegin(), aAnnotation.getEnd(), aRange); } log.trace("FEAT[{}-{}]: {}", aRange.getBegin(), aRange.getEnd(), fieldsAndValues); } } return mtasId; }
boolean oneEntryMatched = false; if(m != null && !m.isEmpty()) { for(Map.Entry<Integer,T> entry : m.entries()) { Integer key = entry.getKey(); if(r.contains(key)) {