Class ComponentTypes

java.lang.Object
java.util.BitSet
gaiasky.render.ComponentTypes
All Implemented Interfaces:
Serializable, Cloneable

public class ComponentTypes extends BitSet
See Also:
  • Field Details

  • Constructor Details

    • ComponentTypes

      public ComponentTypes()
    • ComponentTypes

      public ComponentTypes(int ordinal)
    • ComponentTypes

      public ComponentTypes(ComponentTypes.ComponentType... cts)
  • Method Details

    • getFirstOrdinal

      public int getFirstOrdinal()
      Returns the index of the rightmost bit set to 1. If no bits are set to 1, returns -1
      Returns:
      The first ordinal
    • allSetLike

      public boolean allSetLike(ComponentTypes other)
      Checks if all the t bits in this bit set are also set in other.
      Parameters:
      other - The bit set to check against
      Returns:
      True if all the bits set to true in this bit set are also true in other. Returns false otherwise
    • isEnabled

      public boolean isEnabled(ComponentTypes.ComponentType ct)
      Checks whether the given ComponentTypes.ComponentType is enabled in this ComponentTypes instance
      Parameters:
      ct - The component type to check
      Returns:
      True if the component type is enabled
    • toString

      public String toString()
      Overrides:
      toString in class BitSet