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

How to use
ensureCapacity
method
in
com.badlogic.gdx.utils.IntSet

Best Java code snippets using com.badlogic.gdx.utils.IntSet.ensureCapacity (Showing top 6 results out of 315)

origin: libgdx/libgdx

public void addAll (int[] array, int offset, int length) {
  ensureCapacity(length);
  for (int i = offset, n = i + length; i < n; i++)
    add(array[i]);
}
origin: libgdx/libgdx

public void addAll (int[] array, int offset, int length) {
  ensureCapacity(length);
  for (int i = offset, n = i + length; i < n; i++)
    add(array[i]);
}
origin: libgdx/libgdx

public void addAll (IntSet set) {
  ensureCapacity(set.size);
  IntSetIterator iterator = set.iterator();
  while (iterator.hasNext)
    add(iterator.next());
}
origin: libgdx/libgdx

public void addAll (IntSet set) {
  ensureCapacity(set.size);
  IntSetIterator iterator = set.iterator();
  while (iterator.hasNext)
    add(iterator.next());
}
origin: com.badlogicgames.gdx/gdx

public void addAll (int[] array, int offset, int length) {
  ensureCapacity(length);
  for (int i = offset, n = i + length; i < n; i++)
    add(array[i]);
}
origin: com.badlogicgames.gdx/gdx

public void addAll (IntSet set) {
  ensureCapacity(set.size);
  IntSetIterator iterator = set.iterator();
  while (iterator.hasNext)
    add(iterator.next());
}
com.badlogic.gdx.utilsIntSetensureCapacity

Javadoc

Increases the size of the backing array to accommodate the specified number of additional items. Useful before adding many items to avoid multiple backing array resizes.

Popular methods of IntSet

  • add
    Returns true if the key was not already in the set.
  • contains
  • iterator
    Returns an iterator for the keys in the set. Remove is supported. Note that the same iterator instan
  • remove
    Returns true if the key was removed.
  • <init>
    Creates a new set identical to the specified set.
  • addAll
  • addResize
    Skips checks for existing keys.
  • addStash
  • clear
    Clears the set and reduces the size of the backing arrays to be the specified capacity if they are l
  • containsKeyStash
  • hash2
  • hash3
  • hash2,
  • hash3,
  • push,
  • removeStash,
  • removeStashIndex,
  • resize

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • getResourceAsStream (ClassLoader)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Reference (javax.naming)
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Best plugins for Eclipse
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