Tabnine Logo
Maps$SortedMapDifferenceImpl.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.google.common.collect.Maps$SortedMapDifferenceImpl
constructor

Best Java code snippets using com.google.common.collect.Maps$SortedMapDifferenceImpl.<init> (Showing top 14 results out of 315)

origin: google/guava

/**
 * Computes the difference between two sorted maps, using the comparator of the left map, or
 * {@code Ordering.natural()} if the left map uses the natural ordering of its elements. This
 * difference is an immutable snapshot of the state of the maps at the time this method is called.
 * It will never change, even if the maps change at a later time.
 *
 * <p>Since this method uses {@code TreeMap} instances internally, the keys of the right map must
 * all compare as distinct according to the comparator of the left map.
 *
 * <p><b>Note:</b>If you only need to know whether two sorted maps have the same mappings, call
 * {@code left.equals(right)} instead of this method.
 *
 * @param left the map to treat as the "left" map for purposes of comparison
 * @param right the map to treat as the "right" map for purposes of comparison
 * @return the difference between the two maps
 * @since 11.0
 */
public static <K, V> SortedMapDifference<K, V> difference(
  SortedMap<K, ? extends V> left, Map<? extends K, ? extends V> right) {
 checkNotNull(left);
 checkNotNull(right);
 Comparator<? super K> comparator = orNaturalOrder(left.comparator());
 SortedMap<K, V> onlyOnLeft = Maps.newTreeMap(comparator);
 SortedMap<K, V> onlyOnRight = Maps.newTreeMap(comparator);
 onlyOnRight.putAll(right); // will whittle it down
 SortedMap<K, V> onBoth = Maps.newTreeMap(comparator);
 SortedMap<K, MapDifference.ValueDifference<V>> differences = Maps.newTreeMap(comparator);
 doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences);
 return new SortedMapDifferenceImpl<>(onlyOnLeft, onlyOnRight, onBoth, differences);
}
origin: wildfly/wildfly

/**
 * Computes the difference between two sorted maps, using the comparator of the left map, or
 * {@code Ordering.natural()} if the left map uses the natural ordering of its elements. This
 * difference is an immutable snapshot of the state of the maps at the time this method is called.
 * It will never change, even if the maps change at a later time.
 *
 * <p>Since this method uses {@code TreeMap} instances internally, the keys of the right map must
 * all compare as distinct according to the comparator of the left map.
 *
 * <p><b>Note:</b>If you only need to know whether two sorted maps have the same mappings, call
 * {@code left.equals(right)} instead of this method.
 *
 * @param left the map to treat as the "left" map for purposes of comparison
 * @param right the map to treat as the "right" map for purposes of comparison
 * @return the difference between the two maps
 * @since 11.0
 */
public static <K, V> SortedMapDifference<K, V> difference(
  SortedMap<K, ? extends V> left, Map<? extends K, ? extends V> right) {
 checkNotNull(left);
 checkNotNull(right);
 Comparator<? super K> comparator = orNaturalOrder(left.comparator());
 SortedMap<K, V> onlyOnLeft = Maps.newTreeMap(comparator);
 SortedMap<K, V> onlyOnRight = Maps.newTreeMap(comparator);
 onlyOnRight.putAll(right); // will whittle it down
 SortedMap<K, V> onBoth = Maps.newTreeMap(comparator);
 SortedMap<K, MapDifference.ValueDifference<V>> differences = Maps.newTreeMap(comparator);
 doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences);
 return new SortedMapDifferenceImpl<>(onlyOnLeft, onlyOnRight, onBoth, differences);
}
origin: google/j2objc

private enum EntryFunction implements Function<Entry<?, ?>, Object> {
 KEY {
  @Override
  @NullableDecl
  public Object apply(Entry<?, ?> entry) {
   return entry.getKey();
  }
 },
 VALUE {
  @Override
  @NullableDecl
  public Object apply(Entry<?, ?> entry) {
   return entry.getValue();
  }
 };
}
origin: com.ning.billing/killbill-osgi-bundles-jruby

  Maps.newTreeMap(comparator);
doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences);
return new SortedMapDifferenceImpl<K, V>(onlyOnLeft, onlyOnRight, onBoth, differences);
origin: com.google.guava/guava-jdk5

  Maps.newTreeMap(comparator);
doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences);
return new SortedMapDifferenceImpl<K, V>(onlyOnLeft, onlyOnRight, onBoth, differences);
origin: com.diffplug.guava/guava-collect

SortedMap<K, MapDifference.ValueDifference<V>> differences = Maps.newTreeMap(comparator);
doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences);
return new SortedMapDifferenceImpl<K, V>(onlyOnLeft, onlyOnRight, onBoth, differences);
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

  Maps.newTreeMap(comparator);
doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences);
return new SortedMapDifferenceImpl<K, V>(onlyOnLeft, onlyOnRight, onBoth, differences);
origin: com.ning.billing/killbill-osgi-bundles-analytics

  Maps.newTreeMap(comparator);
doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences);
return new SortedMapDifferenceImpl<K, V>(onlyOnLeft, onlyOnRight, onBoth, differences);
origin: at.bestsolution.efxclipse.eclipse/com.google.guava

  Maps.newTreeMap(comparator);
doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences);
return new SortedMapDifferenceImpl<K, V>(onlyOnLeft, onlyOnRight, onBoth, differences);
origin: org.jboss.eap/wildfly-client-all

/**
 * Computes the difference between two sorted maps, using the comparator of the left map, or
 * {@code Ordering.natural()} if the left map uses the natural ordering of its elements. This
 * difference is an immutable snapshot of the state of the maps at the time this method is called.
 * It will never change, even if the maps change at a later time.
 *
 * <p>Since this method uses {@code TreeMap} instances internally, the keys of the right map must
 * all compare as distinct according to the comparator of the left map.
 *
 * <p><b>Note:</b>If you only need to know whether two sorted maps have the same mappings, call
 * {@code left.equals(right)} instead of this method.
 *
 * @param left the map to treat as the "left" map for purposes of comparison
 * @param right the map to treat as the "right" map for purposes of comparison
 * @return the difference between the two maps
 * @since 11.0
 */
public static <K, V> SortedMapDifference<K, V> difference(
  SortedMap<K, ? extends V> left, Map<? extends K, ? extends V> right) {
 checkNotNull(left);
 checkNotNull(right);
 Comparator<? super K> comparator = orNaturalOrder(left.comparator());
 SortedMap<K, V> onlyOnLeft = Maps.newTreeMap(comparator);
 SortedMap<K, V> onlyOnRight = Maps.newTreeMap(comparator);
 onlyOnRight.putAll(right); // will whittle it down
 SortedMap<K, V> onBoth = Maps.newTreeMap(comparator);
 SortedMap<K, MapDifference.ValueDifference<V>> differences = Maps.newTreeMap(comparator);
 doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences);
 return new SortedMapDifferenceImpl<>(onlyOnLeft, onlyOnRight, onBoth, differences);
}
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

/**
 * Computes the difference between two sorted maps, using the comparator of the left map, or
 * {@code Ordering.natural()} if the left map uses the natural ordering of its elements. This
 * difference is an immutable snapshot of the state of the maps at the time this method is called.
 * It will never change, even if the maps change at a later time.
 *
 * <p>Since this method uses {@code TreeMap} instances internally, the keys of the right map must
 * all compare as distinct according to the comparator of the left map.
 *
 * <p><b>Note:</b>If you only need to know whether two sorted maps have the same mappings, call
 * {@code left.equals(right)} instead of this method.
 *
 * @param left the map to treat as the "left" map for purposes of comparison
 * @param right the map to treat as the "right" map for purposes of comparison
 * @return the difference between the two maps
 * @since 11.0
 */
public static <K, V> SortedMapDifference<K, V> difference(
  SortedMap<K, ? extends V> left, Map<? extends K, ? extends V> right) {
 checkNotNull(left);
 checkNotNull(right);
 Comparator<? super K> comparator = orNaturalOrder(left.comparator());
 SortedMap<K, V> onlyOnLeft = Maps.newTreeMap(comparator);
 SortedMap<K, V> onlyOnRight = Maps.newTreeMap(comparator);
 onlyOnRight.putAll(right); // will whittle it down
 SortedMap<K, V> onBoth = Maps.newTreeMap(comparator);
 SortedMap<K, MapDifference.ValueDifference<V>> differences = Maps.newTreeMap(comparator);
 doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences);
 return new SortedMapDifferenceImpl<>(onlyOnLeft, onlyOnRight, onBoth, differences);
}
origin: Nextdoor/bender

  Maps.newTreeMap(comparator);
doDifference(left, right, Equivalence.equals(), onlyOnLeft, onlyOnRight, onBoth, differences);
return new SortedMapDifferenceImpl<K, V>(onlyOnLeft, onlyOnRight, onBoth, differences);
origin: org.sonatype.sisu/sisu-guava

private static <K, V> SortedMapDifference<K, V> sortedMapDifference(
  boolean areEqual, SortedMap<K, V> onlyOnLeft, SortedMap<K, V> onlyOnRight,
  SortedMap<K, V> onBoth, SortedMap<K, ValueDifference<V>> differences) {
 return new SortedMapDifferenceImpl<K, V>(areEqual,
   Collections.unmodifiableSortedMap(onlyOnLeft),
   Collections.unmodifiableSortedMap(onlyOnRight),
   Collections.unmodifiableSortedMap(onBoth),
   Collections.unmodifiableSortedMap(differences));
}
origin: org.hudsonci.lib.guava/guava

private static <K, V> SortedMapDifference<K, V> sortedMapDifference(
  boolean areEqual, SortedMap<K, V> onlyOnLeft, SortedMap<K, V> onlyOnRight,
  SortedMap<K, V> onBoth, SortedMap<K, ValueDifference<V>> differences) {
 return new SortedMapDifferenceImpl<K, V>(areEqual,
   Collections.unmodifiableSortedMap(onlyOnLeft),
   Collections.unmodifiableSortedMap(onlyOnRight),
   Collections.unmodifiableSortedMap(onBoth),
   Collections.unmodifiableSortedMap(differences));
}
com.google.common.collectMaps$SortedMapDifferenceImpl<init>

Popular methods of Maps$SortedMapDifferenceImpl

    Popular in Java

    • Creating JSON documents from java classes using gson
    • scheduleAtFixedRate (ScheduledExecutorService)
    • notifyDataSetChanged (ArrayAdapter)
    • getSystemService (Context)
    • RandomAccessFile (java.io)
      Allows reading from and writing to a file in a random-access manner. This is different from the uni-
    • System (java.lang)
      Provides access to system-related information and resources including standard input and output. Ena
    • Collection (java.util)
      Collection is the root of the collection hierarchy. It defines operations on data collections and t
    • ConcurrentHashMap (java.util.concurrent)
      A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
    • AtomicInteger (java.util.concurrent.atomic)
      An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
    • Option (scala)
    • Top PhpStorm plugins
    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