congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
BitVector.intersects
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: junkdog/artemis-odb

/**
 * Returns whether this Aspect would accept the given set.
 */
public boolean isInterested(BitVector componentBits){
  // Check if the entity possesses ALL of the components defined in the aspect.
  if(!allSet.isEmpty() && !componentBits.containsAll(allSet))
    return false;
  // If we are STILL interested,
  // Check if the entity possesses ANY of the exclusion components,
  // if it does then the system is not interested.
  if (!exclusionSet.isEmpty() && exclusionSet.intersects(componentBits))
    return false;
  // If we are STILL interested,
  // Check if the entity possesses ANY of the components in the oneSet.
  // If so, the system is interested.
  if (!oneSet.isEmpty() && !oneSet.intersects(componentBits))
    return false;
  return true;
}
origin: net.onedaybeard.artemis/artemis-odb

/**
 * Returns whether this Aspect would accept the given set.
 */
public boolean isInterested(BitVector componentBits){
  // Check if the entity possesses ALL of the components defined in the aspect.
  if(!allSet.isEmpty() && !componentBits.containsAll(allSet))
    return false;
  // If we are STILL interested,
  // Check if the entity possesses ANY of the exclusion components,
  // if it does then the system is not interested.
  if (!exclusionSet.isEmpty() && exclusionSet.intersects(componentBits))
    return false;
  // If we are STILL interested,
  // Check if the entity possesses ANY of the components in the oneSet.
  // If so, the system is interested.
  if (!oneSet.isEmpty() && !oneSet.intersects(componentBits))
    return false;
  return true;
}
origin: junkdog/artemis-odb

/**
 * Returns whether this Aspect would accept the given set.
 */
public boolean isInterested(BitVector componentBits){
  // Check if the entity possesses ALL of the components defined in the aspect.
  if(!allSet.isEmpty()) {
    for (int i = allSet.nextSetBit(0); i >= 0; i = allSet.nextSetBit(i+1)) {
      if(!componentBits.get(i)) {
        return false;
      }
    }
  }
  // If we are STILL interested,
  // Check if the entity possesses ANY of the exclusion components,
  // if it does then the system is not interested.
  if (!exclusionSet.isEmpty() && exclusionSet.intersects(componentBits))
    return false;
  // If we are STILL interested,
  // Check if the entity possesses ANY of the components in the oneSet.
  // If so, the system is interested.
  if (!oneSet.isEmpty() && !oneSet.intersects(componentBits))
    return false;
  return true;
}
com.artemis.utilsBitVectorintersects

Javadoc

Returns true if the specified BitVector has any bits set to true that are also set to true in this BitVector.

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

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • setRequestProperty (URLConnection)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Top 17 Free Sublime Text Plugins
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