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

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

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

origin: apache/ignite

/**
 *
 * @param partsMap Partitions map.
 * @param parts Partitions.
 * @return Result.
 */
private static Map<ClusterNode, IntArray> narrowForQuery(Map<ClusterNode, IntArray> partsMap, int[] parts) {
  if (parts == null)
    return partsMap;
  Map<ClusterNode, IntArray> cp = U.newHashMap(partsMap.size());
  for (Map.Entry<ClusterNode, IntArray> entry : partsMap.entrySet()) {
    IntArray filtered = new IntArray(parts.length);
    IntArray orig = entry.getValue();
    for (int i = 0; i < orig.size(); i++) {
      int p = orig.get(i);
      if (Arrays.binarySearch(parts, p) >= 0)
        filtered.add(p);
    }
    if (filtered.size() > 0)
      cp.put(entry.getKey(), filtered);
  }
  return cp.isEmpty() ? null : cp;
}
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: apache/ignite

  target.set(idx, param);
paramIdxs.add(idx);
origin: apache/ignite

partIds.add(partId);
origin: com.h2database/h2

list.add(t.getPos());
for (int i = 0;; i++) {
  int next = t.getPageData(i);
    break;
  list.add(next);
origin: com.h2database/h2

dataPages.add(d);
origin: com.h2database/h2

paramColumnIndex.add(i);
origin: apache/ignite

  res.put(n, parts = new IntArray());
parts.add(p);
origin: com.h2database/com.springsource.org.h2

public void addValueSorted(int value) {
  int l = 0, r = size;
  while (l < r) {
    int i = (l + r) >>> 1;
    int d = data[i];
    if (d == value) {
      return;
    } else if (d > value) {
      r = i;
    } else {
      l = i + 1;
    }
  }
  add(l, value);
}
origin: com.h2database/com.springsource.org.h2

public void add(int i, int value) {
  if (SysProperties.CHECK && i > size) {
    throw new ArrayIndexOutOfBoundsException("i=" + i + " size=" + size);
  }
  checkCapacity();
  if (i == size) {
    add(value);
  } else {
    System.arraycopy(data, i, data, i + 1, size - i);
    data[i] = value;
    size++;
  }
}
origin: com.h2database/com.springsource.org.h2

private void setBlockCount(int count) {
  fileBlockCount = count;
  int pages = getPage(count);
  while (pages >= pageOwners.size()) {
    pageOwners.add(FREE_PAGE);
  }
}
origin: com.h2database/com.springsource.org.h2

void free(int pos, int blockCount) {
  file.free(pos, blockCount);
  if (freeList.size() < FREE_LIST_SIZE) {
    freeList.add(pos);
  }
}
origin: org.apache.ignite/ignite-indexing

/** */
private Map<ClusterNode, IntArray> narrowForQuery(Map<ClusterNode, IntArray> partsMap, int[] parts) {
  if (parts == null)
    return partsMap;
  Map<ClusterNode, IntArray> cp = U.newHashMap(partsMap.size());
  for (Map.Entry<ClusterNode, IntArray> entry : partsMap.entrySet()) {
    IntArray filtered = new IntArray(parts.length);
    IntArray orig = entry.getValue();
    for (int i = 0; i < orig.size(); i++) {
      int p = orig.get(i);
      if (Arrays.binarySearch(parts, p) >= 0)
        filtered.add(p);
    }
    if (filtered.size() > 0)
      cp.put(entry.getKey(), filtered);
  }
  return cp.isEmpty() ? null : cp;
}
origin: com.h2database/com.springsource.org.h2

BtreeNode(BtreeIndex index, BtreePage left, SearchRow pivot, BtreePage right) {
  super(index);
  pageChildren = new IntArray();
  pageChildren.add(left.getPos());
  pageChildren.add(right.getPos());
  pageData = new ObjectArray();
  pageData.add(pivot);
}
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);
  }
}
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: org.apache.ignite/ignite-indexing

  target.set(idx, param);
paramIdxs.add(idx);
origin: org.wowtools/h2

list.add(t.getPos());
for (int i = 0;; i++) {
  int next = t.getPageData(i);
    break;
  list.add(next);
origin: com.eventsourcing/h2

list.add(t.getPos());
for (int i = 0;; i++) {
  int next = t.getPageData(i);
    break;
  list.add(next);
origin: com.h2database/com.springsource.org.h2

public BtreePage split(Session session, int splitPoint) throws SQLException {
  ObjectArray data = new ObjectArray();
  IntArray children = new IntArray();
  splitPoint++;
  int max = pageData.size();
  if (SysProperties.CHECK && index.getDatabase().getLogIndexChanges() && !getDeleted()) {
    // page must have been deleted already before calling
    // getSplitPoint()
    throw Message.getInternalError();
  }
  for (int i = splitPoint; i < max; i++) {
    data.add(getData(splitPoint));
    children.add(getChild(splitPoint));
    pageData.remove(splitPoint);
    pageChildren.remove(splitPoint);
  }
  children.add(getChild(splitPoint));
  pageData.remove(splitPoint - 1);
  pageChildren.remove(splitPoint);
  BtreeNode n2 = new BtreeNode(index, children, data);
  index.updatePage(session, this);
  index.addPage(session, n2);
  return n2;
}
org.h2.utilIntArrayadd

Javadoc

Append a value.

Popular methods of IntArray

  • <init>
    Create an int array with the given values and size.
  • 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.
  • ensureCapacity
    Ensure the the underlying array is large enough for the given number of entries.
  • removeRange
    Remove a number of elements.
  • addValueSorted
  • checkCapacity
  • findNextValueIndex
  • removeValue
  • findNextValueIndex,
  • removeValue,
  • set

Popular in Java

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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