Interface GroupedBitmaskable

All Superinterfaces:
Bitmaskable

public interface GroupedBitmaskable extends Bitmaskable
API for a Bitmaskable that is grouped by an index value into like-sized groupings.
Since:
1.61
Version:
1.0
Author:
matt
  • Field Details

  • Method Details

    • getGroupIndex

      int getGroupIndex()
      Get the group index.
      Returns:
      the group index
    • getGroupSize

      int getGroupSize()
      Get the size of each group.
      Returns:
      the size of each group
    • getOverallIndex

      default int getOverallIndex()
      Get the overall bitmask number within all groups, starting from 0.
      Returns:
      the fault number
    • groupBitmaskValue

      static int groupBitmaskValue(Set<? extends GroupedBitmaskable> values, int group)
      Get a group's bitmask value from a set of grouped bitmaskables.
      Parameters:
      values - the set of grouped bitmaskables to extract the group's bitmask value from
      group - the bitmask group to extract
      Returns:
      the bitmask value for the given group
    • overallBitmaskValue

      static BitSet overallBitmaskValue(Set<? extends GroupedBitmaskable> values)
      Get the overall bitmask values from a set of grouped bitmaskables.
      Parameters:
      values - the set of grouped bitmaskables to extract the overall bitmask value from
      Returns:
      the bitset of overall enabled bits, or null if no bits are set