Package etithespirit.orimod.util
Class Bit32
java.lang.Object
etithespirit.orimod.util.Bit32
A collection of utilities for 32 bit integers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
hasAllFlags
(int value, int flags) Returns true if the given value has all of the bits in flags set.static boolean
hasAnyFlag
(int value, int flags) Returns true if the given value has at least one of the bits in flags set.
-
Constructor Details
-
Bit32
public Bit32()
-
-
Method Details
-
hasAnyFlag
public static boolean hasAnyFlag(int value, int flags) Returns true if the given value has at least one of the bits in flags set.- Parameters:
value
- The value to check.flags
- The flags to check the value against.- Returns:
- True if at least one of the bits of flags is also set in value.
-
hasAllFlags
public static boolean hasAllFlags(int value, int flags) Returns true if the given value has all of the bits in flags set.- Parameters:
value
- The value to check.flags
- The flags to check the value against.- Returns:
- True if every one of the bits of flags is also set in value.
-