Package gaiasky.render
Class ComponentTypes
java.lang.Object
java.util.BitSet
gaiasky.render.ComponentTypes
- All Implemented Interfaces:
Serializable
,Cloneable
- See Also:
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allSetLike
(ComponentTypes other) Checks if all the t bits in this bit set are also set in other.int
Returns the index of the rightmost bit set to 1.boolean
Checks whether the givenComponentTypes.ComponentType
is enabled in thisComponentTypes
instancetoString()
Methods inherited from class java.util.BitSet
and, andNot, cardinality, clear, clear, clear, clone, equals, flip, flip, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, or, previousClearBit, previousSetBit, set, set, set, set, size, stream, toByteArray, toLongArray, valueOf, valueOf, valueOf, valueOf, xor
-
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 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
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
-