Tabnine Logo
IntArray.ensureCapacity
Code IndexAdd Tabnine to your IDE (free)

How to use
ensureCapacity
method
in
org.h2.util.IntArray

Best Java code snippets using org.h2.util.IntArray.ensureCapacity (Showing top 6 results out of 315)

origin: com.h2database/h2

/**
 * Append a value.
 *
 * @param value the value to append
 */
public void add(int value) {
  if (size >= data.length) {
    ensureCapacity(size + size);
  }
  data[size++] = value;
}
origin: com.h2database/h2

/**
 * Allocate a number of pages.
 *
 * @param list the list where to add the allocated pages
 * @param pagesToAllocate the number of pages to allocate
 * @param exclude the exclude list
 * @param after all allocated pages are higher than this page
 */
void allocatePages(IntArray list, int pagesToAllocate, BitField exclude,
    int after) {
  list.ensureCapacity(list.size() + pagesToAllocate);
  for (int i = 0; i < pagesToAllocate; i++) {
    int page = allocatePage(exclude, after);
    after = page;
    list.add(page);
  }
}
origin: org.wowtools/h2

/**
 * Append a value.
 *
 * @param value the value to append
 */
public void add(int value) {
  if (size >= data.length) {
    ensureCapacity(size + size);
  }
  data[size++] = value;
}
origin: com.eventsourcing/h2

/**
 * Append a value.
 *
 * @param value the value to append
 */
public void add(int value) {
  if (size >= data.length) {
    ensureCapacity(size + size);
  }
  data[size++] = value;
}
origin: org.wowtools/h2

/**
 * Allocate a number of pages.
 *
 * @param list the list where to add the allocated pages
 * @param pagesToAllocate the number of pages to allocate
 * @param exclude the exclude list
 * @param after all allocated pages are higher than this page
 */
void allocatePages(IntArray list, int pagesToAllocate, BitField exclude,
    int after) {
  list.ensureCapacity(list.size() + pagesToAllocate);
  for (int i = 0; i < pagesToAllocate; i++) {
    int page = allocatePage(exclude, after);
    after = page;
    list.add(page);
  }
}
origin: com.eventsourcing/h2

/**
 * Allocate a number of pages.
 *
 * @param list the list where to add the allocated pages
 * @param pagesToAllocate the number of pages to allocate
 * @param exclude the exclude list
 * @param after all allocated pages are higher than this page
 */
void allocatePages(IntArray list, int pagesToAllocate, BitField exclude,
    int after) {
  list.ensureCapacity(list.size() + pagesToAllocate);
  for (int i = 0; i < pagesToAllocate; i++) {
    int page = allocatePage(exclude, after);
    after = page;
    list.add(page);
  }
}
org.h2.utilIntArrayensureCapacity

Javadoc

Ensure the the underlying array is large enough for the given number of entries.

Popular methods of IntArray

  • <init>
    Create an int array with the given values and size.
  • add
  • get
    Get the value at the given index.
  • size
    Get the size of the list.
  • toArray
    Convert this list to an array. The target array must be big enough.
  • hashCode
  • remove
    Remove the value at the given index.
  • removeRange
    Remove a number of elements.
  • addValueSorted
  • checkCapacity
  • findNextValueIndex
  • removeValue
  • findNextValueIndex,
  • removeValue,
  • set

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • addToBackStack (FragmentTransaction)
  • getSupportFragmentManager (FragmentActivity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JList (javax.swing)
  • Top PhpStorm plugins
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