
com.carrotsearch.hppcrt.ObjectCollection Maven / Gradle / Ivy
package com.carrotsearch.hppcrt;
import com.carrotsearch.hppcrt.predicates.ObjectPredicate;
/**
* A collection allows basic, efficient operations on sets of elements
* (difference and intersection).
*/
@javax.annotation.Generated(
date = "2015-10-21T20:36:37+0200",
value = "KTypeCollection.java")
public interface ObjectCollection extends ObjectContainer
{
/**
* 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 removeAll(KType 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(ObjectLookupContainer super KType> c);
/**
* Removes all elements in this collection for which the
* given predicate returns true
.
*
* @return Returns the number of removed elements.
*/
int removeAll(ObjectPredicate super KType> 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(ObjectLookupContainer super KType> c);
/**
* Keeps all elements in this collection for which the
* given predicate returns true
.
*
* @return Returns the number of removed elements.
*/
int retainAll(ObjectPredicate super KType> predicate);
/**
* Removes all elements from this collection.
*/
void clear();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy