com.carrotsearch.hppc
Interface IntCollection

All Superinterfaces:
IntContainer, java.lang.Iterable<IntCursor>
All Known Subinterfaces:
IntDeque, IntIndexedContainer, IntSet
All Known Implementing Classes:
IntArrayDeque, IntArrayList, IntByteOpenHashMap.KeysContainer, IntCharOpenHashMap.KeysContainer, IntDoubleLinkedSet, IntDoubleOpenHashMap.KeysContainer, IntFloatOpenHashMap.KeysContainer, IntIntOpenHashMap.KeysContainer, IntLongOpenHashMap.KeysContainer, IntObjectOpenHashMap.KeysContainer, IntOpenHashSet, IntShortOpenHashMap.KeysContainer, IntStack

@Generated(date="2011-11-28T23:36:05+0000",
           value="HPPC generated from: IntCollection.java")
public interface IntCollection
extends IntContainer

A collection allows basic, efficient operations on sets of elements (difference and intersection).


Method Summary
 void clear()
          Removes all elements from this collection.
 int removeAll(IntLookupContainer c)
          Removes all elements in this collection that are present in c.
 int removeAll(IntPredicate predicate)
          Removes all elements in this collection for which the given predicate returns true.
 int removeAllOccurrences(int e)
          Removes all occurrences of e from this collection.
 int retainAll(IntLookupContainer c)
          Keeps all elements in this collection that are present in c.
 int retainAll(IntPredicate predicate)
          Keeps all elements in this collection for which the given predicate returns true.
 
Methods inherited from interface com.carrotsearch.hppc.IntContainer
contains, forEach, forEach, isEmpty, iterator, size, toArray
 

Method Detail

removeAllOccurrences

int removeAllOccurrences(int e)
Removes all occurrences of e from this collection.

Parameters:
e - Element to be removed from this collection, if present.
Returns:
The number of removed elements as a result of this call.

removeAll

int removeAll(IntLookupContainer c)
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.

Returns:
Returns the number of removed elements.

removeAll

int removeAll(IntPredicate predicate)
Removes all elements in this collection for which the given predicate returns true.


retainAll

int retainAll(IntLookupContainer c)
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.

Returns:
Returns the number of removed elements.

retainAll

int retainAll(IntPredicate predicate)
Keeps all elements in this collection for which the given predicate returns true.


clear

void clear()
Removes all elements from this collection.



Copyright © 2011 Carrot Search s.c.. All Rights Reserved.