Package gaiasky.render
Class ComponentTypes
java.lang.Object
gaiasky.util.Bits
gaiasky.render.ComponentTypes
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class gaiasky.util.Bits
DEFAULT_LENGTH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
allSetLike
(ComponentTypes other) Checks if all the bits in this bit set are also set in the other.int
Returns the index of the rightmost bit set to 1.boolean
Checks whether the givenComponentTypes.ComponentType
is enabled in thisComponentTypes
instancetoString()
-
Field Details
-
Constructor Details
-
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
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
Checks whether the givenComponentTypes.ComponentType
is enabled in thisComponentTypes
instance- Parameters:
ct
- The component type to check- Returns:
- True if the component type is enabled
-
toString
-