Codota Logo
BitVector.checkCapacity
Code IndexAdd Codota to your IDE (free)

How to use
checkCapacity
method
in
com.artemis.utils.BitVector

Best Java code snippets using com.artemis.utils.BitVector.checkCapacity (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: junkdog/artemis-odb

/**
 * Grows the backing array (<code>long[]</code>) so that it can hold the requested
 * bits. Mostly applicable when relying on the <code>unsafe</code> methods,
 * including {@link #unsafeGet(int)} and {@link #unsafeClear(int)}.
 *
 * @param bits number of bits to accomodate
 */
public void ensureCapacity(int bits) {
  checkCapacity(bits >>> 6);
}
origin: net.onedaybeard.artemis/artemis-odb

/**
 * Grows the backing array (<code>long[]</code>) so that it can hold the requested
 * bits. Mostly applicable when relying on the <code>unsafe</code> methods,
 * including {@link #unsafeGet(int)} and {@link #unsafeClear(int)}.
 *
 * @param bits number of bits to accomodate
 */
public void ensureCapacity(int bits) {
  checkCapacity(bits >>> 6);
}
origin: junkdog/artemis-odb

/** Creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range 0 through
 * nbits-1.
 * @param nbits the initial size of the bit set */
public BitVector(int nbits) {
  checkCapacity(nbits >>> 6);
}
origin: junkdog/artemis-odb

/** @param index the index of the bit to set
 * @throws ArrayIndexOutOfBoundsException if index < 0 */
public void set(int index) {
  final int word = index >>> 6;
  checkCapacity(word);
  words[word] |= 1L << index;
}
origin: junkdog/artemis-odb

/** @param index the index of the bit to flip */
public void flip(int index) {
  final int word = index >>> 6;
  checkCapacity(word);
  words[word] ^= 1L << index;
}
origin: net.onedaybeard.artemis/artemis-odb

/** Creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range 0 through
 * nbits-1.
 * @param nbits the initial size of the bit set */
public BitVector(int nbits) {
  checkCapacity(nbits >>> 6);
}
origin: net.onedaybeard.artemis/artemis-odb

/** @param index the index of the bit to set
 * @throws ArrayIndexOutOfBoundsException if index < 0 */
public void set(int index) {
  final int word = index >>> 6;
  checkCapacity(word);
  words[word] |= 1L << index;
}
origin: net.onedaybeard.artemis/artemis-odb

/** @param index the index of the bit to flip */
public void flip(int index) {
  final int word = index >>> 6;
  checkCapacity(word);
  words[word] ^= 1L << index;
}
origin: junkdog/artemis-odb

/** Performs a logical <b>OR</b> of this bit set with the bit set argument. This bit set is modified so that a bit in it has the
 * value true if and only if it either already had the value true or the corresponding bit in the bit set argument has the
 * value true.
 * @param other a bit set */
public void or(BitVector other) {
  int commonWords = Math.min(words.length, other.words.length);
  for (int i = 0; commonWords > i; i++) {
    words[i] |= other.words[i];
  }
  if (commonWords < other.words.length) {
    checkCapacity(other.words.length);
    for (int i = commonWords, s = other.words.length; s > i; i++) {
      words[i] = other.words[i];
    }
  }
}
origin: net.onedaybeard.artemis/artemis-odb

/** Performs a logical <b>XOR</b> of this bit set with the bit set argument. This bit set is modified so that a bit in it has
 * the value true if and only if one of the following statements holds:
 * <ul>
 * <li>The bit initially has the value true, and the corresponding bit in the argument has the value false.</li>
 * <li>The bit initially has the value false, and the corresponding bit in the argument has the value true.</li>
 * </ul>
 * @param other */
public void xor(BitVector other) {
  int commonWords = Math.min(words.length, other.words.length);
  for (int i = 0; commonWords > i; i++) {
    words[i] ^= other.words[i];
  }
  if (commonWords < other.words.length) {
    checkCapacity(other.words.length);
    for (int i = commonWords, s = other.words.length; s > i; i++) {
      words[i] = other.words[i];
    }
  }
}
origin: net.onedaybeard.artemis/artemis-odb

/** Performs a logical <b>OR</b> of this bit set with the bit set argument. This bit set is modified so that a bit in it has the
 * value true if and only if it either already had the value true or the corresponding bit in the bit set argument has the
 * value true.
 * @param other a bit set */
public void or(BitVector other) {
  int commonWords = Math.min(words.length, other.words.length);
  for (int i = 0; commonWords > i; i++) {
    words[i] |= other.words[i];
  }
  if (commonWords < other.words.length) {
    checkCapacity(other.words.length);
    for (int i = commonWords, s = other.words.length; s > i; i++) {
      words[i] = other.words[i];
    }
  }
}
origin: junkdog/artemis-odb

/** Performs a logical <b>XOR</b> of this bit set with the bit set argument. This bit set is modified so that a bit in it has
 * the value true if and only if one of the following statements holds:
 * <ul>
 * <li>The bit initially has the value true, and the corresponding bit in the argument has the value false.</li>
 * <li>The bit initially has the value false, and the corresponding bit in the argument has the value true.</li>
 * </ul>
 * @param other */
public void xor(BitVector other) {
  int commonWords = Math.min(words.length, other.words.length);
  for (int i = 0; commonWords > i; i++) {
    words[i] ^= other.words[i];
  }
  if (commonWords < other.words.length) {
    checkCapacity(other.words.length);
    for (int i = commonWords, s = other.words.length; s > i; i++) {
      words[i] = other.words[i];
    }
  }
}
com.artemis.utilsBitVectorcheckCapacity

Popular methods of BitVector

  • get
  • clear
  • nextSetBit
    Returns the index of the first bit that is set to true that occurs on or after the specified startin
  • set
  • <init>
  • cardinality
  • equals
  • intersects
    Returns true if the specified BitVector has any bits set to true that are also set to true in this B
  • isEmpty
  • length
    Returns the "logical size" of this bitset: the index of the highest set bit in the bitset plus one.
  • or
    Performs a logical OR of this bit set with the bit set argument. This bit set is modified so that a
  • toIntBag
    Decodes the set bits as integers. The destination IntBag is reset before the bits are transposed.
  • or,
  • toIntBag,
  • unsafeGet,
  • andNot,
  • bitIndex,
  • bitOffset,
  • checkIndex,
  • checkRange,
  • clone

Popular in Java

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
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