Tabnine Logo
RegularImmutableMultiset.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.google.common.collect.RegularImmutableMultiset
constructor

Best Java code snippets using com.google.common.collect.RegularImmutableMultiset.<init> (Showing top 13 results out of 315)

origin: google/guava

Multisets.ImmutableEntry<E>[] entryArray = new Multisets.ImmutableEntry[distinct];
if (distinct == 0) {
 return new RegularImmutableMultiset<>(entryArray, null, 0, 0, ImmutableSet.of());
  : new RegularImmutableMultiset<E>(
    entryArray, hashTable, Ints.saturatedCast(size), hashCode, null);
origin: wildfly/wildfly

Multisets.ImmutableEntry<E>[] entryArray = new Multisets.ImmutableEntry[distinct];
if (distinct == 0) {
 return new RegularImmutableMultiset<>(entryArray, null, 0, 0, ImmutableSet.of());
  : new RegularImmutableMultiset<E>(
    entryArray, hashTable, Ints.saturatedCast(size), hashCode, null);
origin: com.diffplug.guava/guava-collect

static <E> ImmutableMultiset<E> copyFromEntries(
    Collection<? extends Entry<? extends E>> entries) {
  if (entries.isEmpty()) {
    return of();
  } else {
    return new RegularImmutableMultiset<E>(entries);
  }
}
origin: org.hudsonci.lib.guava/guava

static <E> ImmutableMultiset<E> copyFromEntries(
  Collection<? extends Entry<? extends E>> entries) {
 long size = 0;
 ImmutableMap.Builder<E, Integer> builder = ImmutableMap.builder();
 for (Entry<? extends E> entry : entries) {
  int count = entry.getCount();
  if (count > 0) {
   // Since ImmutableMap.Builder throws an NPE if an element is null, no
   // other null checks are needed.
   builder.put(entry.getElement(), count);
   size += count;
  }
 }
 if (size == 0) {
  return of();
 }
 return new RegularImmutableMultiset<E>(
   builder.build(), Ints.saturatedCast(size));
}
origin: com.google.guava/guava-jdk5

static <E> ImmutableMultiset<E> copyFromEntries(
  Collection<? extends Entry<? extends E>> entries) {
 long size = 0;
 ImmutableMap.Builder<E, Integer> builder = ImmutableMap.builder();
 for (Entry<? extends E> entry : entries) {
  int count = entry.getCount();
  if (count > 0) {
   // Since ImmutableMap.Builder throws an NPE if an element is null, no
   // other null checks are needed.
   builder.put(entry.getElement(), count);
   size += count;
  }
 }
 if (size == 0) {
  return of();
 }
 return new RegularImmutableMultiset<E>(
   builder.build(), Ints.saturatedCast(size));
}
origin: com.ning.billing/killbill-osgi-bundles-analytics

static <E> ImmutableMultiset<E> copyFromEntries(
  Collection<? extends Entry<? extends E>> entries) {
 long size = 0;
 ImmutableMap.Builder<E, Integer> builder = ImmutableMap.builder();
 for (Entry<? extends E> entry : entries) {
  int count = entry.getCount();
  if (count > 0) {
   // Since ImmutableMap.Builder throws an NPE if an element is null, no
   // other null checks are needed.
   builder.put(entry.getElement(), count);
   size += count;
  }
 }
 if (size == 0) {
  return of();
 }
 return new RegularImmutableMultiset<E>(
   builder.build(), Ints.saturatedCast(size));
}
origin: Nextdoor/bender

static <E> ImmutableMultiset<E> copyFromEntries(
  Collection<? extends Entry<? extends E>> entries) {
 long size = 0;
 ImmutableMap.Builder<E, Integer> builder = ImmutableMap.builder();
 for (Entry<? extends E> entry : entries) {
  int count = entry.getCount();
  if (count > 0) {
   // Since ImmutableMap.Builder throws an NPE if an element is null, no
   // other null checks are needed.
   builder.put(entry.getElement(), count);
   size += count;
  }
 }
 if (size == 0) {
  return of();
 }
 return new RegularImmutableMultiset<E>(
   builder.build(), Ints.saturatedCast(size));
}
origin: org.sonatype.sisu/sisu-guava

static <E> ImmutableMultiset<E> copyFromEntries(
  Collection<? extends Entry<? extends E>> entries) {
 long size = 0;
 ImmutableMap.Builder<E, Integer> builder = ImmutableMap.builder();
 for (Entry<? extends E> entry : entries) {
  int count = entry.getCount();
  if (count > 0) {
   // Since ImmutableMap.Builder throws an NPE if an element is null, no
   // other null checks are needed.
   builder.put(entry.getElement(), count);
   size += count;
  }
 }
 if (size == 0) {
  return of();
 }
 return new RegularImmutableMultiset<E>(builder.build(), Ints.saturatedCast(size));
}
origin: at.bestsolution.efxclipse.eclipse/com.google.guava

static <E> ImmutableMultiset<E> copyFromEntries(
  Collection<? extends Entry<? extends E>> entries) {
 long size = 0;
 ImmutableMap.Builder<E, Integer> builder = ImmutableMap.builder();
 for (Entry<? extends E> entry : entries) {
  int count = entry.getCount();
  if (count > 0) {
   // Since ImmutableMap.Builder throws an NPE if an element is null, no
   // other null checks are needed.
   builder.put(entry.getElement(), count);
   size += count;
  }
 }
 if (size == 0) {
  return of();
 }
 return new RegularImmutableMultiset<E>(
   builder.build(), Ints.saturatedCast(size));
}
origin: com.ning.billing/killbill-osgi-bundles-jruby

static <E> ImmutableMultiset<E> copyFromEntries(
  Collection<? extends Entry<? extends E>> entries) {
 long size = 0;
 ImmutableMap.Builder<E, Integer> builder = ImmutableMap.builder();
 for (Entry<? extends E> entry : entries) {
  int count = entry.getCount();
  if (count > 0) {
   // Since ImmutableMap.Builder throws an NPE if an element is null, no
   // other null checks are needed.
   builder.put(entry.getElement(), count);
   size += count;
  }
 }
 if (size == 0) {
  return of();
 }
 return new RegularImmutableMultiset<E>(
   builder.build(), Ints.saturatedCast(size));
}
origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

static <E> ImmutableMultiset<E> copyFromEntries(
  Collection<? extends Entry<? extends E>> entries) {
 long size = 0;
 ImmutableMap.Builder<E, Integer> builder = ImmutableMap.builder();
 for (Entry<? extends E> entry : entries) {
  int count = entry.getCount();
  if (count > 0) {
   // Since ImmutableMap.Builder throws an NPE if an element is null, no
   // other null checks are needed.
   builder.put(entry.getElement(), count);
   size += count;
  }
 }
 if (size == 0) {
  return of();
 }
 return new RegularImmutableMultiset<E>(
   builder.build(), Ints.saturatedCast(size));
}
origin: org.jboss.eap/wildfly-client-all

Multisets.ImmutableEntry<E>[] entryArray = new Multisets.ImmutableEntry[distinct];
if (distinct == 0) {
 return new RegularImmutableMultiset<>(entryArray, null, 0, 0, ImmutableSet.of());
  : new RegularImmutableMultiset<E>(
    entryArray, hashTable, Ints.saturatedCast(size), hashCode, null);
origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

Multisets.ImmutableEntry<E>[] entryArray = new Multisets.ImmutableEntry[distinct];
if (distinct == 0) {
 return new RegularImmutableMultiset<>(entryArray, null, 0, 0, ImmutableSet.of());
  : new RegularImmutableMultiset<E>(
    entryArray, hashTable, Ints.saturatedCast(size), hashCode, null);
com.google.common.collectRegularImmutableMultiset<init>

Popular methods of RegularImmutableMultiset

  • create
  • hashFloodingDetected

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • findViewById (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best IntelliJ 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