Module lmdbjava
Package org.lmdbjava

Interface MaskedFlag

All Known Implementing Classes:
CopyFlags, DbiFlags, EnvFlags, PutFlags, TxnFlags

public interface MaskedFlag
Indicates an enum that can provide integers for each of its values.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Obtains the integer value for this enum which can be included in a mask.
    static boolean
    isSet(int flags, MaskedFlag test)
    Indicates whether the passed flag has the relevant masked flag high.
    static int
    mask(MaskedFlag... flags)
    Fetch the integer mask for all presented flags.
  • Method Details

    • getMask

      int getMask()
      Obtains the integer value for this enum which can be included in a mask.
      Returns:
      the integer value for combination into a mask
    • mask

      static int mask(MaskedFlag... flags)
      Fetch the integer mask for all presented flags.
      Parameters:
      flags - to mask (null or empty returns zero)
      Returns:
      the integer mask for use in C
    • isSet

      static boolean isSet(int flags, MaskedFlag test)
      Indicates whether the passed flag has the relevant masked flag high.
      Parameters:
      flags - to evaluate (usually produced by mask(org.lmdbjava.MaskedFlag...)
      test - the flag being sought (required)
      Returns:
      true if set.