Tabnine Logo
SortedSetMultimap.get
Code IndexAdd Tabnine to your IDE (free)

How to use
get
method
in
com.google.common.collect.SortedSetMultimap

Best Java code snippets using com.google.common.collect.SortedSetMultimap.get (Showing top 20 results out of 369)

origin: Graylog2/graylog2-server

public Collection<Stream> getByName(String name) {
  return nameToStream.get(name);
}
origin: google/guava

@Override
public SortedSet<V> get(K key) {
 synchronized (mutex) {
  return sortedSet(delegate().get(key), mutex);
 }
}
origin: google/guava

@Override
public SortedSet<V> get(K key) {
 return Collections.unmodifiableSortedSet(delegate().get(key));
}
origin: google/guava

@Override
public SortedSet<V> get(@Nullable K key) {
 return delegate().get(key);
}
origin: wildfly/wildfly

@Override
public SortedSet<V> get(K key) {
 synchronized (mutex) {
  return sortedSet(delegate().get(key), mutex);
 }
}
origin: wildfly/wildfly

@Override
public SortedSet<V> get(K key) {
 return Collections.unmodifiableSortedSet(delegate().get(key));
}
origin: google/j2objc

@Override
public SortedSet<V> get(@NullableDecl K key) {
 return delegate().get(key);
}
origin: google/guava

 public void testValueComparator() {
  assertEquals(multimap().valueComparator(), multimap().get(k0()).comparator());
 }
}
origin: wildfly/wildfly

@Override
public SortedSet<V> get(@NullableDecl K key) {
 return delegate().get(key);
}
origin: MovingBlocks/Terasology

private void invokeDelayedOperations(long currentWorldTime) {
  List<EntityRef> operationsToInvoke = new LinkedList<>();
  Iterator<Long> scheduledOperationsIterator = delayedOperationsSortedByTime.keySet().iterator();
  long processedTime;
  while (scheduledOperationsIterator.hasNext()) {
    processedTime = scheduledOperationsIterator.next();
    if (processedTime > currentWorldTime) {
      break;
    }
    operationsToInvoke.addAll(delayedOperationsSortedByTime.get(processedTime));
    scheduledOperationsIterator.remove();
  }
  operationsToInvoke.stream().filter(EntityRef::exists).forEach(delayedEntity -> {
    final DelayedActionComponent delayedActions = delayedEntity.getComponent(DelayedActionComponent.class);
    // If there is a DelayedActionComponent, proceed. Else report an error to the log.
    if (delayedActions != null) {
      final Set<String> actionIds = delayedActions.removeActionsUpTo(currentWorldTime);
      saveOrRemoveComponent(delayedEntity, delayedActions);
      if (!delayedActions.isEmpty()) {
        delayedOperationsSortedByTime.put(delayedActions.getLowestWakeUp(), delayedEntity);
      }
      for (String actionId : actionIds) {
        delayedEntity.send(new DelayedActionTriggeredEvent(actionId));
      }
    } else {
      logger.error("ERROR: This entity is missing a DelayedActionComponent: {}. " +
          "So skipping delayed actions for this entity.", delayedEntity);
    }
  });
}
origin: MovingBlocks/Terasology

private void invokePeriodicOperations(long currentWorldTime) {
  List<EntityRef> operationsToInvoke = new LinkedList<>();
  Iterator<Long> scheduledOperationsIterator = periodicOperationsSortedByTime.keySet().iterator();
  long processedTime;
  while (scheduledOperationsIterator.hasNext()) {
    processedTime = scheduledOperationsIterator.next();
    if (processedTime > currentWorldTime) {
      break;
    }
    operationsToInvoke.addAll(periodicOperationsSortedByTime.get(processedTime));
    scheduledOperationsIterator.remove();
  }
  operationsToInvoke.stream().filter(EntityRef::exists).forEach(periodicEntity -> {
    final PeriodicActionComponent periodicActionComponent = periodicEntity.getComponent(PeriodicActionComponent.class);
    // If there is a PeriodicActionComponent, proceed. Else report an error to the log.
    if (periodicActionComponent != null) {
      final Set<String> actionIds = periodicActionComponent.getTriggeredActionsAndReschedule(currentWorldTime);
      saveOrRemoveComponent(periodicEntity, periodicActionComponent);
      if (!periodicActionComponent.isEmpty()) {
        periodicOperationsSortedByTime.put(periodicActionComponent.getLowestWakeUp(), periodicEntity);
      }
      for (String actionId : actionIds) {
        periodicEntity.send(new PeriodicActionTriggeredEvent(actionId));
      }
    } else {
      logger.error("ERROR: This entity is missing a DelayedActionComponent: {}. " +
          "So skipping delayed actions for this entity", periodicEntity);
    }
  });
}
origin: google/guava

public void testSynchronizedSortedSetMultimap() {
 SortedSetMultimap<String, Integer> multimap =
   Multimaps.synchronizedSortedSetMultimap(TreeMultimap.<String, Integer>create());
 multimap.putAll("foo", Arrays.asList(3, -1, 2, 4, 1));
 multimap.putAll("bar", Arrays.asList(1, 2, 3, 1));
 assertThat(multimap.removeAll("foo")).containsExactly(-1, 1, 2, 3, 4).inOrder();
 assertFalse(multimap.containsKey("foo"));
 assertThat(multimap.replaceValues("bar", Arrays.asList(6, 5)))
   .containsExactly(1, 2, 3)
   .inOrder();
 assertThat(multimap.get("bar")).containsExactly(5, 6).inOrder();
}
origin: google/guava

public void testNewSortedSetMultimap() {
 CountingSupplier<TreeSet<Integer>> factory = new SortedSetSupplier();
 Map<Color, Collection<Integer>> map = Maps.newEnumMap(Color.class);
 SortedSetMultimap<Color, Integer> multimap = Multimaps.newSortedSetMultimap(map, factory);
 // newSortedSetMultimap calls the factory once to determine the comparator.
 assertEquals(1, factory.count);
 multimap.putAll(Color.BLUE, asList(3, 1, 4));
 assertEquals(2, factory.count);
 multimap.putAll(Color.RED, asList(2, 7, 1, 8));
 assertEquals(3, factory.count);
 assertEquals("[4, 3, 1]", multimap.get(Color.BLUE).toString());
 assertEquals(INT_COMPARATOR, multimap.valueComparator());
}
origin: MovingBlocks/Terasology

for (String key : sortedApi.keySet()) {
  System.out.println("## " + key + "\n");
  for (String value : sortedApi.get(key)) {
    System.out.println("* " + value);
origin: palantir/atlasdb

  continue;
SortedSet<byte[]> rowNames = rowsForBatches.get(i);
SortedMap<byte[], SortedMap<byte[], Value>> cellsForBatch = Maps.filterKeys(
    request.isReverse() ? cellsByRow.descendingMap() : cellsByRow,
origin: linkedin/indextank-engine

private void internalAdd(int idx, final Document document) {
  for (String field : document.getFieldNames()) {
    Iterator<AToken> tokens = parser.parseDocumentField(field, document.getField(field));
    SortedSetMultimap<String, Integer> termPositions = TreeMultimap.create();
    int tokenCount = 0;
    while (tokens.hasNext()) {
      tokenCount++;
      AToken token = tokens.next();
      termPositions.put(token.getText(), token.getPosition());
    }
      
    for (String term : termPositions.keySet()) {
      Key key = new Key(field, term);
      SortedSet<Integer> positionsSet = termPositions.get(term);
      int[] positions = new int[positionsSet.size()];
      int p = 0;
      for (Integer i : positionsSet) {
        positions[p++] = i;
      }
      DocTermMatchList original = invertedIndex.putIfAbsent(key, new DocTermMatchList(idx, positions, tokenCount));
      if (original != null) {
        original.add(idx, positions, tokenCount);
      }
    }
  }
}
origin: com.google.guava/guava-jdk5

@Override public SortedSet<V> get(K key) {
 synchronized (mutex) {
  return sortedSet(delegate().get(key), mutex);
 }
}
@Override public SortedSet<V> removeAll(Object key) {
origin: org.sonatype.sisu/sisu-guava

@Override public SortedSet<V> get(K key) {
 synchronized (mutex) {
  return sortedSet(delegate().get(key), mutex);
 }
}
@Override public SortedSet<V> removeAll(Object key) {
origin: com.google.collections/google-collections

@Override public SortedSet<V> get(K key) {
 synchronized (mutex) {
  return sortedSet(delegate().get(key), mutex);
 }
}
@Override public SortedSet<V> removeAll(Object key) {
origin: com.google.collect/com.springsource.com.google.common.collect

@Override public SortedSet<V> get(K key) {
 synchronized (mutex) {
  return sortedSet(delegate().get(key), mutex);
 }
}
@Override public SortedSet<V> removeAll(Object key) {
com.google.common.collectSortedSetMultimapget

Javadoc

Returns a collection view of all values associated with a key. If no mappings in the multimap have the provided key, an empty collection is returned.

Changes to the returned collection will update the underlying multimap, and vice versa.

Because a SortedSetMultimap has unique sorted values for a given key, this method returns a SortedSet, instead of the java.util.Collection specified in the Multimap interface.

Popular methods of SortedSetMultimap

  • put
  • removeAll
    Removes all values associated with a given key.Because a SortedSetMultimap has unique sorted values
  • valueComparator
    Returns the comparator that orders the multimap values, with nullindicating that natural ordering is
  • replaceValues
    Stores a collection of values with the same key, replacing any existing values for that key.Because
  • asMap
    Returns a map view that associates each key with the corresponding values in the multimap. Changes t
  • keySet
  • putAll
  • entries
  • values
  • containsKey
  • remove
  • size
  • remove,
  • size,
  • isEmpty,
  • clear

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Collectors (java.util.stream)
  • JTable (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now