Array.removeValue
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.badlogic.gdx.utils.Array.removeValue(Showing top 15 results out of 315)

origin: libgdx/libgdx

/** Frees all resources associated with this Mesh */
public void dispose () {
  if (meshes.get(Gdx.app) != null) meshes.get(Gdx.app).removeValue(this, true);
  vertices.dispose();
  indices.dispose();
}
origin: libgdx/libgdx

@Override
public void removeLifecycleListener(LifecycleListener listener) {
  synchronized (lifecycleListeners) {
    lifecycleListeners.removeValue(listener, true);
  }
}

origin: libgdx/libgdx

public Environment remove (PointLight light) {
  if (has(PointLightsAttribute.Type)) {
    PointLightsAttribute pointLights = ((PointLightsAttribute)get(PointLightsAttribute.Type));
    pointLights.lights.removeValue(light, false);
    if (pointLights.lights.size == 0)
      remove(PointLightsAttribute.Type);
  }
  return this;
}
origin: libgdx/libgdx

/** Destroy a fixture. This removes the fixture from the broad-phase and destroys all contacts associated with this fixture.
 * This will automatically adjust the mass of the body if the body is dynamic and the fixture has positive density. All
 * fixtures attached to a body are implicitly destroyed when the body is destroyed.
 * @param fixture the fixture to be removed.
 * @warning This function is locked during callbacks. */
public void destroyFixture (Fixture fixture) {
  this.world.destroyFixture(this, fixture);
  fixture.setUserData(null);
  this.world.fixtures.remove(fixture.addr);
  this.fixtures.removeValue(fixture, true);
  this.world.freeFixtures.free(fixture);
}
origin: libgdx/libgdx

@Override
public void dispose() {
  if (pixmapCopy == null) {
    throw new GdxRuntimeException("Cursor already disposed");
  }
  cursors.removeValue(this, true);
  pixmapCopy.dispose();
  pixmapCopy = null;
  glfwImage.free();
  GLFW.glfwDestroyCursor(glfwCursor);
}
origin: libgdx/libgdx

public void stop () {
  if (audio.noDevice) return;
  if (sourceID == -1) return;
  audio.music.removeValue(this, true);
  reset();
  audio.freeSource(sourceID);
  sourceID = -1;
  renderedSeconds = 0;
  renderedSecondsQueue.clear();
  isPlaying = false;
}
origin: libgdx/libgdx

public void remove (T button) {
  if (button == null) throw new IllegalArgumentException("button cannot be null.");
  button.buttonGroup = null;
  buttons.removeValue(button, true);
  checkedButtons.removeValue(button, true);
}
origin: libgdx/libgdx

public void detach(int aEventType, Listener aListener)
{
  Array<Listener> listeners = mListeners.get(aEventType);
  if(listeners != null)
  {
    listeners.removeValue(aListener, true);
    if(listeners.size == 0) mListeners.remove(aEventType);
  }    
}

origin: libgdx/libgdx

/** Disposes all resources associated with the cubemap */
@Override
public void dispose () {
  // this is a hack. reason: we have to set the glHandle to 0 for textures that are
  // reloaded through the asset manager as we first remove (and thus dispose) the texture
  // and then reload it. the glHandle is set to 0 in invalidateAllTextures prior to
  // removal from the asset manager.
  if (glHandle == 0) return;
  delete();
  if (data.isManaged()) if (managedCubemaps.get(Gdx.app) != null) managedCubemaps.get(Gdx.app).removeValue(this, true);
}
origin: libgdx/libgdx

public boolean add (T key, int index) {
  if (!super.add(key)) {
    items.removeValue(key, true);
    items.insert(index, key);
    return false;
  }
  items.insert(index, key);
  return true;
}
origin: libgdx/libgdx

/** Removes an event listener for Android specific event such as onActivityResult(...). */
public void removeAndroidEventListener (AndroidEventListener listener) {
  synchronized (androidEventListeners) {
    androidEventListeners.removeValue(listener, true);
  }
}
origin: libgdx/libgdx

/** Removes an event listener for Android specific event such as onActivityResult(...). */
public void removeAndroidEventListener (AndroidEventListener listener) {
  synchronized (androidEventListeners) {
    androidEventListeners.removeValue(listener, true);
  }
}
origin: libgdx/libgdx

/** Removes the specified node as child of this node. On success, the child node will be not attached to any parent node (its
 * {@link #getParent()} method will return null). If the specified node currently isn't a child of this node then the removal
 * is considered to be unsuccessful and the method will return false.
 * @param child The child node to remove.
 * @return Whether the removal was successful. */
public <T extends Node> boolean removeChild (final T child) {
  if (!children.removeValue(child, true)) return false;
  child.parent = null;
  return true;
}
origin: libgdx/libgdx

@Override
public void removeListener (ControllerListener listener) {
  synchronized (eventQueue) {
    listeners.removeValue(listener, true);
  }
}
origin: libgdx/libgdx

@Override
public void removeLifecycleListener (LifecycleListener listener) {
  synchronized(lifecycleListeners) {
    lifecycleListeners.removeValue(listener, true);
  }        
}

com.badlogic.gdx.utilsArrayremoveValue

Javadoc

Removes the first instance of the specified value in the array.

Popular methods of Array

  • add
  • clear
  • get
  • addAll
  • removeIndex
    Removes and returns the item at the specified index.
  • iterator
    Returns an iterator for the items in the array. Remove is supported. Note that the same iterator ins
  • <init>
    Creates a new ordered array containing the elements in the specified array. The new array will have
  • indexOf
    Returns the index of first occurrence of value in the array, or -1 if no such value exists.
  • contains
    Returns if this array contains value.
  • ensureCapacity
    Increases the size of the backing array to accommodate the specified number of additional items. Use
  • pop
    Removes and returns the last item.
  • first
    Returns the first item.
  • pop,
  • first,
  • insert,
  • peek,
  • removeAll,
  • reverse,
  • set,
  • sort,
  • toArray

Popular classes and methods

  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • onCreateOptionsMenu (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Format (java.text)
    Format is an abstract base class for formatting locale-sensitive information such as dates, messages
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)