Class Bit32

java.lang.Object
etithespirit.orimod.util.Bit32

public final class Bit32 extends Object
A collection of utilities for 32 bit integers.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.