All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.carrotsearch.hppcrt.IntCollection Maven / Gradle / Ivy

package com.carrotsearch.hppcrt;

import com.carrotsearch.hppcrt.predicates.IntPredicate;

/**
 * A collection allows basic, efficient operations on sets of elements
 * (difference and intersection).
 */
 @javax.annotation.Generated(date = "2014-08-19T19:56:38+0200", value = "HPPC-RT generated from: IntCollection.java") 
public interface IntCollection extends IntContainer
{
    /**
     * Removes all occurrences of e from this collection.
     * 
     * @param e Element to be removed from this collection, if present.
     * @return The number of removed elements as a result of this call.
     */
    int removeAllOccurrences(int e);

    /**
     * Removes all elements in this collection that are present
     * in c. Runs in time proportional to the number
     * of elements in this collection. Equivalent of sets difference.
     * 
     * @return Returns the number of removed elements.
     */
    int removeAll(IntLookupContainer c);

    /**
     * Removes all elements in this collection for which the
     * given predicate returns true.
     * 
     * @return Returns the number of removed elements.
     */
    int removeAll(IntPredicate predicate);

    /**
     * Keeps all elements in this collection that are present
     * in c. Runs in time proportional to the number
     * of elements in this collection. Equivalent of sets intersection.
     * 
     * @return Returns the number of removed elements.
     */
    int retainAll(IntLookupContainer c);

    /**
     * Keeps all elements in this collection for which the
     * given predicate returns true.
     * 
     * @return Returns the number of removed elements.
     */
    int retainAll(IntPredicate predicate);

    /**
     * Removes all elements from this collection.
     */
    void clear();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy