congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Sets.makeComplementByHand
Code IndexAdd Tabnine to your IDE (free)

How to use
makeComplementByHand
method
in
org.apache.drill.shaded.guava.com.google.common.collect.Sets

Best Java code snippets using org.apache.drill.shaded.guava.com.google.common.collect.Sets.makeComplementByHand (Showing top 2 results out of 315)

origin: org.apache.drill/drill-shaded-guava

/**
 * Creates an {@code EnumSet} consisting of all enum values that are not in
 * the specified collection. If the collection is an {@link EnumSet}, this
 * method has the same behavior as {@link EnumSet#complementOf}. Otherwise,
 * the specified collection must contain at least one element, in order to
 * determine the element type. If the collection could be empty, use
 * {@link #complementOf(Collection, Class)} instead of this method.
 *
 * @param collection the collection whose complement should be stored in the
 *     enum set
 * @return a new, modifiable {@code EnumSet} containing all values of the enum
 *     that aren't present in the given collection
 * @throws IllegalArgumentException if {@code collection} is not an
 *     {@code EnumSet} instance and contains no elements
 */
public static <E extends Enum<E>> EnumSet<E> complementOf(Collection<E> collection) {
 if (collection instanceof EnumSet) {
  return EnumSet.complementOf((EnumSet<E>) collection);
 }
 checkArgument(
   !collection.isEmpty(), "collection is empty; use the other version of this method");
 Class<E> type = collection.iterator().next().getDeclaringClass();
 return makeComplementByHand(collection, type);
}
origin: org.apache.drill/drill-shaded-guava

/**
 * Creates an {@code EnumSet} consisting of all enum values that are not in
 * the specified collection. This is equivalent to
 * {@link EnumSet#complementOf}, but can act on any input collection, as long
 * as the elements are of enum type.
 *
 * @param collection the collection whose complement should be stored in the
 *     {@code EnumSet}
 * @param type the type of the elements in the set
 * @return a new, modifiable {@code EnumSet} initially containing all the
 *     values of the enum not present in the given collection
 */
public static <E extends Enum<E>> EnumSet<E> complementOf(
  Collection<E> collection, Class<E> type) {
 checkNotNull(collection);
 return (collection instanceof EnumSet)
   ? EnumSet.complementOf((EnumSet<E>) collection)
   : makeComplementByHand(collection, type);
}
org.apache.drill.shaded.guava.com.google.common.collectSetsmakeComplementByHand

Popular methods of Sets

  • newHashSet
    Creates a mutable HashSet instance initially containing the given elements.Note: if elements are non
  • newLinkedHashSet
    Creates a mutable LinkedHashSet instance containing the given elements in order. Note: if mutability
  • newTreeSet
    Creates a mutable, empty TreeSet instance with the given comparator.Note: if mutability is not requi
  • union
    Returns an unmodifiable view of the union of two sets. The returned set contains all elements that a
  • filter
    Returns the elements of a SortedSet, unfiltered, that satisfy a predicate. The returned set is a liv
  • intersection
    Returns an unmodifiable view of the intersection of two sets. The returned set contains all elements
  • newHashSetWithExpectedSize
    Returns a new hash set using the smallest initial table size that can hold expectedSizeelements with
  • newIdentityHashSet
    Creates an empty Set that uses identity to determine equality. It compares object references, instea
  • cartesianProduct
    Returns every possible list that can be formed by choosing one element from each of the given sets i
  • difference
    Returns an unmodifiable view of the difference of two sets. The returned set contains all elements t
  • equalsImpl
    An implementation for Set#equals(Object).
  • hashCodeImpl
    An implementation for Set#hashCode().
  • equalsImpl,
  • hashCodeImpl,
  • immutableEnumSet,
  • newConcurrentHashSet,
  • newLinkedHashSetWithExpectedSize,
  • removeAllImpl,
  • unmodifiableNavigableSet

Popular in Java

  • Updating database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • compareTo (BigDecimal)
  • getApplicationContext (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 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