com.carrotsearch.hppcrt.ShortCollection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hppcrt Show documentation
Show all versions of hppcrt Show documentation
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.
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();
}