Class ComponentTypes
java.lang.Object
gaiasky.util.Bits
gaiasky.render.ComponentTypes
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class Bits
DEFAULT_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallSetLike(ComponentTypes other) Checks if all the bits in this bit set are also set in the other.intReturns the index of the rightmost bit set to 1.booleanChecks whether the givenComponentTypes.ComponentTypeis enabled in thisComponentTypesinstancetoString()
-
Field Details
-
CT_SIZE
public static final int CT_SIZE- See Also:
-
-
Constructor Details
-
ComponentTypes
public ComponentTypes() -
ComponentTypes
public ComponentTypes(int ordinal) -
ComponentTypes
-
-
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.ComponentTypeis enabled in thisComponentTypesinstance- Parameters:
ct- The component type to check- Returns:
- True if the component type is enabled
-
toString
-