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

com.carrotsearch.hppc.DoubleCollection Maven / Gradle / Ivy

There is a newer version: 4.15.102
Show newest version
package com.carrotsearch.hppc;

import com.carrotsearch.hppc.predicates.DoublePredicate;

/**
 * A collection allows basic, efficient operations on sets of elements
 * (difference and intersection).
 */
 @javax.annotation.Generated(
    date = "2015-05-07T09:33:03+0200",
    value = "KTypeCollection.java") 
public interface DoubleCollection extends DoubleContainer {
  /**
   * 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.
   */
  public int removeAll(double e);

  /**
   * Removes all elements in this collection that are present in c.
   * 
   * @return Returns the number of removed elements.
   */
  public int removeAll(DoubleLookupContainer c);

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

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

  /**
   * Removes all elements from this collection.
   * 
   * @see #release()
   */
  public void clear();

  /**
   * Removes all elements from the collection and additionally releases any
   * internal buffers. Typically, if the object is to be reused, a simple
   * {@link #clear()} should be a better alternative since it'll avoid
   * reallocation.
   * 
   * @see #clear()
   */
  public void release();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy