Codota Logo
PriorityBuffer.isEmpty
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
SimpleDateFormat s =
  • Codota IconString pattern;new SimpleDateFormat(pattern)
  • Codota IconString template;Locale locale;new SimpleDateFormat(template, locale)
  • Codota Iconnew SimpleDateFormat()
  • Smart code suggestions by Codota
}
origin: commons-collections/commons-collections

/**
 * Gets the next element to be removed without actually removing it (peek).
 *
 * @return the next element
 * @throws BufferUnderflowException if the buffer is empty
 */
public Object get() {
  if (isEmpty()) {
    throw new BufferUnderflowException();
  } else {
    return elements[1];
  }
}
origin: wildfly/wildfly

/**
 * Gets the next element to be removed without actually removing it (peek).
 *
 * @return the next element
 * @throws BufferUnderflowException if the buffer is empty
 */
public Object get() {
  if (isEmpty()) {
    throw new BufferUnderflowException();
  } else {
    return elements[1];
  }
}
origin: commons-collections/commons-collections

/**
 * Pops all elements from the heap and verifies that the elements come off
 * in the correct order.  NOTE: this method empties the heap.
 */
protected void checkOrder(PriorityBuffer h) {
  Integer lastNum = null;
  Integer num = null;
  while (!h.isEmpty()) {
    num = (Integer) h.remove();
    if (h.ascendingOrder) {
      assertTrue(lastNum == null || num.intValue() >= lastNum.intValue());
    } else { // max heap
      assertTrue(lastNum == null || num.intValue() <= lastNum.intValue());
    }
    lastNum = num;
    num = null;
  }
}

origin: commons-collections/commons-collections

heap.add("f");
assertTrue("heap should not be empty after adds", !heap.isEmpty());
    assertTrue("heap should not be empty before all elements are removed", !heap.isEmpty());
  } else {
    assertTrue("heap should be empty after all elements are removed", heap.isEmpty());
origin: commons-collections/commons-collections

public void testBasicComparatorOps() {
  PriorityBuffer heap = new PriorityBuffer(new ReverseComparator(new ComparableComparator()));
  assertTrue("heap should be empty after create", heap.isEmpty());
  heap.add("f");
  assertTrue("heap should not be empty after adds", !heap.isEmpty());
      assertTrue("heap should not be empty before all elements are removed", !heap.isEmpty());
    } else {
      assertTrue("heap should be empty after all elements are removed", heap.isEmpty());
origin: org.apache.openjpa/openjpa-all

/**
 * Gets the next element to be removed without actually removing it (peek).
 *
 * @return the next element
 * @throws BufferUnderflowException if the buffer is empty
 */
public Object get() {
  if (isEmpty()) {
    throw new BufferUnderflowException();
  } else {
    return elements[1];
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-collections

/**
 * Gets the next element to be removed without actually removing it (peek).
 *
 * @return the next element
 * @throws BufferUnderflowException if the buffer is empty
 */
public Object get() {
  if (isEmpty()) {
    throw new BufferUnderflowException();
  } else {
    return elements[1];
  }
}
origin: org.apache.directory.api/api-ldap-client-all

/**
 * Gets the next element to be removed without actually removing it (peek).
 *
 * @return the next element
 * @throws BufferUnderflowException if the buffer is empty
 */
public Object get() {
  if (isEmpty()) {
    throw new BufferUnderflowException();
  } else {
    return elements[1];
  }
}
origin: com.alibaba.citrus.tool/antx-autoexpand

/**
 * Gets the next element to be removed without actually removing it (peek).
 *
 * @return the next element
 * @throws BufferUnderflowException if the buffer is empty
 */
public Object get() {
  if (isEmpty()) {
    throw new BufferUnderflowException();
  } else {
    return elements[1];
  }
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Gets the next element to be removed without actually removing it (peek).
 *
 * @return the next element
 * @throws BufferUnderflowException if the buffer is empty
 */
public Object get() {
  if (isEmpty()) {
    throw new BufferUnderflowException();
  } else {
    return elements[1];
  }
}
org.apache.commons.collections.bufferPriorityBufferisEmpty

Popular methods of PriorityBuffer

  • get
    Gets the next element to be removed without actually removing it (peek).
  • 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
  • isAtCapacity
    Tests if the buffer is at capacity.
  • 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

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Socket (java.net)
    Provides a client-side TCP socket.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now