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

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

Go to download

High Performance Primitive Collections Realtime (fork of HPPC from Carrotsearch) Fundamental data structures (maps, sets, lists, queues, heaps, sorts) generated for combinations of object and primitive types to conserve JVM memory and speed up execution. The Realtime fork intends to extend the existing collections, by tweaking to remove any dynamic allocations at runtime, and to obtain low variance execution times whatever the input nature.

There is a newer version: 0.7.5
Show newest version
package com.carrotsearch.hppcrt;

import com.carrotsearch.hppcrt.predicates.ShortPredicate;

/**
 * A collection allows basic, efficient operations on sets of elements
 * (difference and intersection).
 */
 @javax.annotation.Generated(date = "2014-10-25T20:54:13+0200", value = "HPPC-RT generated from: ShortCollection.java") 
public interface ShortCollection extends ShortContainer
{
    /**
     * 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(short 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(ShortLookupContainer c);

    /**
     * Removes all elements in this collection for which the
     * given predicate returns true.
     * 
     * @return Returns the number of removed elements.
     */
    int removeAll(ShortPredicate 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(ShortLookupContainer c);

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy