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

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

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

origin: google/j2objc

@Override
public Comparator<? super V> valueComparator() {
 synchronized (mutex) {
  return delegate().valueComparator();
 }
}
origin: google/j2objc

@Override
public Comparator<? super V> valueComparator() {
 return delegate().valueComparator();
}
origin: google/guava

@Override
public Comparator<? super V> valueComparator() {
 synchronized (mutex) {
  return delegate().valueComparator();
 }
}
origin: google/guava

 @Override
 public Comparator<? super V> valueComparator() {
  return delegate().valueComparator();
 }
}
origin: google/guava

@Override
public Comparator<? super V> valueComparator() {
 return delegate().valueComparator();
}
origin: google/j2objc

 @Override
 public Comparator<? super V> valueComparator() {
  return delegate().valueComparator();
 }
}
origin: wildfly/wildfly

@Override
public Comparator<? super V> valueComparator() {
 synchronized (mutex) {
  return delegate().valueComparator();
 }
}
origin: wildfly/wildfly

 @Override
 public Comparator<? super V> valueComparator() {
  return delegate().valueComparator();
 }
}
origin: google/guava

public void testAsMapValuesImplementSortedSet() {
 for (Collection<V> valueCollection : multimap().asMap().values()) {
  SortedSet<V> valueSet = (SortedSet<V>) valueCollection;
  assertEquals(multimap().valueComparator(), valueSet.comparator());
 }
}
origin: wildfly/wildfly

@Override
public Comparator<? super V> valueComparator() {
 return delegate().valueComparator();
}
origin: google/guava

public void testAsMapGetImplementsSortedSet() {
 for (K key : multimap().keySet()) {
  SortedSet<V> valueSet = (SortedSet<V>) multimap().asMap().get(key);
  assertEquals(multimap().valueComparator(), valueSet.comparator());
 }
}
origin: google/guava

 @MapFeature.Require(SUPPORTS_REMOVE)
 public void testAsMapRemoveImplementsSortedSet() {
  List<K> keys = new ArrayList<K>(multimap().keySet());
  for (K key : keys) {
   resetCollection();
   SortedSet<V> valueSet = (SortedSet<V>) multimap().asMap().remove(key);
   assertEquals(multimap().valueComparator(), valueSet.comparator());
  }
 }
}
origin: google/guava

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

@GwtIncompatible // slow (~10s)
public void testUnmodifiableSynchronizedTreeMultimap() {
 TreeMultimap<String, Integer> delegate =
   TreeMultimap.create(Ordering.<String>natural(), INT_COMPARATOR);
 SortedSetMultimap<String, Integer> multimap = Multimaps.synchronizedSortedSetMultimap(delegate);
 checkUnmodifiableMultimap(multimap, false, "null", 42);
 assertSame(INT_COMPARATOR, multimap.valueComparator());
}
origin: google/guava

@GwtIncompatible // SerializableTester
public void testSerializingUnmodifiableSynchronizedTreeMultimap() {
 TreeMultimap<String, Integer> delegate =
   TreeMultimap.create(Ordering.<String>natural(), INT_COMPARATOR);
 SortedSetMultimap<String, Integer> multimap = Multimaps.synchronizedSortedSetMultimap(delegate);
 Multimap<String, Integer> unmodifiable = prepareUnmodifiableTests(multimap, false, "null", 42);
 SerializableTester.reserializeAndAssert(unmodifiable);
 assertSame(INT_COMPARATOR, multimap.valueComparator());
}
origin: google/guava

@GwtIncompatible // SerializableTester
public void testNewSortedSetMultimapSerialization() {
 CountingSupplier<TreeSet<Integer>> factory = new SortedSetSupplier();
 Map<Color, Collection<Integer>> map = Maps.newEnumMap(Color.class);
 SortedSetMultimap<Color, Integer> multimap = Multimaps.newSortedSetMultimap(map, factory);
 multimap.putAll(Color.BLUE, asList(3, 1, 4));
 multimap.putAll(Color.RED, asList(2, 7, 1, 8));
 SerializableTester.reserializeAndAssert(multimap);
 assertEquals(INT_COMPARATOR, multimap.valueComparator());
}
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: com.google.collections/google-collections

public Comparator<? super V> valueComparator() {
 synchronized (mutex) {
  return delegate().valueComparator();
 }
}
private static final long serialVersionUID = 0;
origin: com.google.guava/guava-collections

public Comparator<? super V> valueComparator() {
 synchronized (mutex) {
  return delegate().valueComparator();
 }
}
private static final long serialVersionUID = 0;
origin: com.google.guava/guava-testlib

public void testAsMapGetImplementsSortedSet() {
 for (K key : multimap().keySet()) {
  SortedSet<V> valueSet = (SortedSet<V>) multimap().asMap().get(key);
  assertEquals(multimap().valueComparator(), valueSet.comparator());
 }
}
com.google.common.collectSortedSetMultimapvalueComparator

Javadoc

Returns the comparator that orders the multimap values, with null indicating that natural ordering is used.

Popular methods of SortedSetMultimap

  • get
    Returns a collection view of all values associated with a key. If no mappings in the multimap have t
  • put
  • removeAll
    Removes all values associated with a given key.Because a SortedSetMultimap has unique sorted values
  • 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

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Github Copilot alternatives
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