Tabnine Logo
PriorityBuffer.isAtCapacity
Code IndexAdd Tabnine to your IDE (free)

How to use
isAtCapacity
method
in
org.apache.commons.collections.buffer.PriorityBuffer

Best Java code snippets using org.apache.commons.collections.buffer.PriorityBuffer.isAtCapacity (Showing top 7 results out of 315)

origin: commons-collections/commons-collections

/**
 * Adds an element to the buffer.
 * <p>
 * The element added will be sorted according to the comparator in use.
 *
 * @param element  the element to be added
 * @return true always
 */
public boolean add(Object element) {
  if (isAtCapacity()) {
    grow();
  }
  // percolate element to it's place in tree
  if (ascendingOrder) {
    percolateUpMinHeap(element);
  } else {
    percolateUpMaxHeap(element);
  }
  return true;
}
origin: wildfly/wildfly

/**
 * Adds an element to the buffer.
 * <p>
 * The element added will be sorted according to the comparator in use.
 *
 * @param element  the element to be added
 * @return true always
 */
public boolean add(Object element) {
  if (isAtCapacity()) {
    grow();
  }
  // percolate element to it's place in tree
  if (ascendingOrder) {
    percolateUpMinHeap(element);
  } else {
    percolateUpMaxHeap(element);
  }
  return true;
}
origin: org.apache.directory.api/api-ldap-client-all

/**
 * Adds an element to the buffer.
 * <p>
 * The element added will be sorted according to the comparator in use.
 *
 * @param element  the element to be added
 * @return true always
 */
public boolean add(Object element) {
  if (isAtCapacity()) {
    grow();
  }
  // percolate element to it's place in tree
  if (ascendingOrder) {
    percolateUpMinHeap(element);
  } else {
    percolateUpMaxHeap(element);
  }
  return true;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-collections

/**
 * Adds an element to the buffer.
 * <p>
 * The element added will be sorted according to the comparator in use.
 *
 * @param element  the element to be added
 * @return true always
 */
public boolean add(Object element) {
  if (isAtCapacity()) {
    grow();
  }
  // percolate element to it's place in tree
  if (ascendingOrder) {
    percolateUpMinHeap(element);
  } else {
    percolateUpMaxHeap(element);
  }
  return true;
}
origin: com.alibaba.citrus.tool/antx-autoexpand

/**
 * Adds an element to the buffer.
 * <p>
 * The element added will be sorted according to the comparator in use.
 *
 * @param element  the element to be added
 * @return true always
 */
public boolean add(Object element) {
  if (isAtCapacity()) {
    grow();
  }
  // percolate element to it's place in tree
  if (ascendingOrder) {
    percolateUpMinHeap(element);
  } else {
    percolateUpMaxHeap(element);
  }
  return true;
}
origin: org.apache.openjpa/openjpa-all

/**
 * Adds an element to the buffer.
 * <p>
 * The element added will be sorted according to the comparator in use.
 *
 * @param element  the element to be added
 * @return true always
 */
public boolean add(Object element) {
  if (isAtCapacity()) {
    grow();
  }
  // percolate element to it's place in tree
  if (ascendingOrder) {
    percolateUpMinHeap(element);
  } else {
    percolateUpMaxHeap(element);
  }
  return true;
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Adds an element to the buffer.
 * <p>
 * The element added will be sorted according to the comparator in use.
 *
 * @param element  the element to be added
 * @return true always
 */
public boolean add(Object element) {
  if (isAtCapacity()) {
    grow();
  }
  // percolate element to it's place in tree
  if (ascendingOrder) {
    percolateUpMinHeap(element);
  } else {
    percolateUpMaxHeap(element);
  }
  return true;
}
org.apache.commons.collections.bufferPriorityBufferisAtCapacity

Javadoc

Tests if the buffer is at capacity.

Popular methods of PriorityBuffer

  • get
    Gets the next element to be removed without actually removing it (peek).
  • isEmpty
  • compare
    Compares two objects using the comparator if specified, or the natural order otherwise.
  • grow
    Increases the size of the heap to support additional elements
  • percolateDownMaxHeap
    Percolates element down heap from the position given by the index. Assumes it is a maximum heap.
  • percolateDownMinHeap
    Percolates element down heap from the position given by the index. Assumes it is a minimum heap.
  • percolateUpMaxHeap
    Percolates a new element up heap from the bottom. Assume it is a maximum heap.
  • percolateUpMinHeap
    Percolates a new element up heap from the bottom. Assumes it is a minimum heap.
  • <init>
    Constructs a new empty buffer specifying the sort order and comparator.
  • add
    Adds an element to the buffer. The element added will be sorted according to the comparator in use.
  • remove
  • size
    Returns the number of elements in this buffer.
  • remove,
  • size,
  • contains,
  • iterator

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JFrame (javax.swing)
  • Join (org.hibernate.mapping)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now