Class ComponentTypes

java.lang.Object
gaiasky.util.Bits
gaiasky.render.ComponentTypes

public class ComponentTypes extends Bits
  • Field Details Link icon

  • Constructor Details Link icon

    • ComponentTypes Link icon

      public ComponentTypes()
    • ComponentTypes Link icon

      public ComponentTypes(int ordinal)
    • ComponentTypes Link icon

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

    • getFirstOrdinal Link icon

      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 Link icon

      public boolean allSetLike(ComponentTypes other)
      Checks if all the bits in this bit set are also set in the 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 the other. Returns false otherwise.
    • isEnabled Link icon

      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 Link icon

      public String toString()
      Overrides:
      toString in class Bits