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

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

Best Java code snippets using com.artemis.utils.BitVector.unsafeGet (Showing top 20 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

/**
 * Check if this entity is active.
 * <p>
 * Active means the entity is being actively processed.
 * </p>
 * 
 * @param entityId
 *            the entities id
 *
 * @return true if active, false if not
 */
public boolean isActive(int entityId) {
  return !recycled.unsafeGet(entityId);
}
origin: junkdog/artemis-odb

boolean isDeleted(int entityId) {
  return pendingPurge.unsafeGet(entityId);
}
origin: net.onedaybeard.artemis/artemis-odb

boolean isDeleted(int entityId) {
  return pendingPurge.unsafeGet(entityId);
}
origin: net.onedaybeard.artemis/artemis-odb

/**
 * Check if this entity is active.
 * <p>
 * Active means the entity is being actively processed.
 * </p>
 * 
 * @param entityId
 *            the entities id
 *
 * @return true if active, false if not
 */
public boolean isActive(int entityId) {
  return !recycled.unsafeGet(entityId);
}
origin: junkdog/artemis-odb

final void check(int id, int cid) {
  boolean interested = aspectCache.unsafeGet(cid);
  boolean contains = activeEntityIds.unsafeGet(id);
  if (interested && !contains) {
    insert(id);
  } else if (!interested && contains) {
    remove(id);
  }
}
origin: net.onedaybeard.artemis/artemis-odb

final void check(int id, int cid) {
  boolean interested = aspectCache.unsafeGet(cid);
  boolean contains = activeEntityIds.unsafeGet(id);
  if (interested && !contains) {
    insert(id);
  } else if (!interested && contains) {
    remove(id);
  }
}
origin: junkdog/artemis-odb

private void changed(IntBag entitiesWithCompositions) {
  int[] ids = entitiesWithCompositions.getData();
  for (int i = 0, s = entitiesWithCompositions.size(); s > i; i += 2) {
    int id = ids[i];
    boolean interested = aspectCache.unsafeGet(ids[i + 1]);
    boolean contains = activeEntityIds.unsafeGet(id);
    if (interested && !contains) {
      insert(id);
    } else if (!interested && contains) {
      remove(id);
    }
  }
}
origin: net.onedaybeard.artemis/artemis-odb

private void changed(IntBag entitiesWithCompositions) {
  int[] ids = entitiesWithCompositions.getData();
  for (int i = 0, s = entitiesWithCompositions.size(); s > i; i += 2) {
    int id = ids[i];
    boolean interested = aspectCache.unsafeGet(ids[i + 1]);
    boolean contains = activeEntityIds.unsafeGet(id);
    if (interested && !contains) {
      insert(id);
    } else if (!interested && contains) {
      remove(id);
    }
  }
}
origin: junkdog/artemis-odb

private void deleted(IntBag entities) {
  int[] ids = entities.getData();
  for (int i = 0, s = entities.size(); s > i; i++) {
    int id = ids[i];
    if (activeEntityIds.unsafeGet(id))
      remove(id);
  }
}
origin: junkdog/artemis-odb

void clean(IntBag pendingDeletion) {
  int[] ids = pendingDeletion.getData();
  for(int i = 0, s = pendingDeletion.size(); s > i; i++) {
    int id = ids[i];
    // usually never happens but:
    // this happens when an entity is deleted before
    // it is added to the world, ie; created and deleted
    // before World#process has been called
    if (!recycled.unsafeGet(id)) {
      free(id);
    }
  }
}
origin: net.onedaybeard.artemis/artemis-odb

private void deleted(IntBag entities) {
  int[] ids = entities.getData();
  for (int i = 0, s = entities.size(); s > i; i++) {
    int id = ids[i];
    if (activeEntityIds.unsafeGet(id))
      remove(id);
  }
}
origin: net.onedaybeard.artemis/artemis-odb

void clean(IntBag pendingDeletion) {
  int[] ids = pendingDeletion.getData();
  for(int i = 0, s = pendingDeletion.size(); s > i; i++) {
    int id = ids[i];
    // usually never happens but:
    // this happens when an entity is deleted before
    // it is added to the world, ie; created and deleted
    // before World#process has been called
    if (!recycled.unsafeGet(id)) {
      free(id);
    }
  }
}
origin: junkdog/artemis-odb

@Override
public void validate(int sourceId, IntBag ids, LinkListener listener) {
  for (int i = 0; ids.size() > i; i++) {
    int id = ids.get(i);
    if (!all.getActiveEntityIds().unsafeGet(id)) {
      ids.remove(i--);
      if (listener != null)
        listener.onTargetDead(sourceId, id);
    }
  }
}
origin: junkdog/artemis-odb

@Override
public void validate(int sourceId, IntBag ids, LinkListener listener) {
  for (int i = 0; ids.size() > i; i++) {
    int id = ids.get(i);
    if (!all.getActiveEntityIds().unsafeGet(id)) {
      ids.remove(i--);
      if (listener != null)
        listener.onTargetDead(sourceId, id);
    }
  }
}
origin: net.onedaybeard.artemis/artemis-odb

@Override
public void validate(int sourceId, IntBag ids, LinkListener listener) {
  for (int i = 0; ids.size() > i; i++) {
    int id = ids.get(i);
    if (!all.getActiveEntityIds().unsafeGet(id)) {
      ids.remove(i--);
      if (listener != null)
        listener.onTargetDead(sourceId, id);
    }
  }
}
origin: net.onedaybeard.artemis/artemis-odb-weaver

@Override
public void validate(int sourceId, IntBag ids, LinkListener listener) {
  for (int i = 0; ids.size() > i; i++) {
    int id = ids.get(i);
    if (!all.getActiveEntityIds().unsafeGet(id)) {
      ids.remove(i--);
      if (listener != null)
        listener.onTargetDead(sourceId, id);
    }
  }
}
origin: net.onedaybeard.artemis/artemis-odb

@Override
public void validate(int sourceId, Bag<Entity> entities, LinkListener listener) {
  for (int i = 0; entities.size() > i; i++) {
    Entity e = entities.get(i);
    if (!all.getActiveEntityIds().unsafeGet(e.getId())) {
      entities.remove(i--);
      if (listener != null)
        listener.onTargetDead(sourceId, e.getId());
    }
  }
}
origin: net.onedaybeard.artemis/artemis-odb-weaver

@Override
public void validate(int sourceId, Bag<Entity> entities, LinkListener listener) {
  for (int i = 0; entities.size() > i; i++) {
    Entity e = entities.get(i);
    if (!all.getActiveEntityIds().unsafeGet(e.getId())) {
      entities.remove(i--);
      if (listener != null)
        listener.onTargetDead(sourceId, e.getId());
    }
  }
}
origin: junkdog/artemis-odb

@Override
public void validate(int sourceId, Bag<Entity> entities, LinkListener listener) {
  for (int i = 0; entities.size() > i; i++) {
    Entity e = entities.get(i);
    if (!all.getActiveEntityIds().unsafeGet(e.getId())) {
      entities.remove(i--);
      if (listener != null)
        listener.onTargetDead(sourceId, e.getId());
    }
  }
}
origin: junkdog/artemis-odb

@Override
public void validate(int sourceId, Bag<Entity> entities, LinkListener listener) {
  for (int i = 0; entities.size() > i; i++) {
    Entity e = entities.get(i);
    if (!all.getActiveEntityIds().unsafeGet(e.getId())) {
      entities.remove(i--);
      if (listener != null)
        listener.onTargetDead(sourceId, e.getId());
    }
  }
}
com.artemis.utilsBitVectorunsafeGet

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,
  • andNot,
  • bitIndex,
  • bitOffset,
  • checkCapacity,
  • checkIndex,
  • checkRange,
  • clone

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • BoxLayout (javax.swing)
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