Enum PortManager.BitSearch

java.lang.Object
java.lang.Enum<PortManager.BitSearch>
org.terracotta.utilities.test.net.PortManager.BitSearch
All Implemented Interfaces:
Serializable, Comparable<PortManager.BitSearch>, java.lang.constant.Constable
Enclosing class:
PortManager

private static enum PortManager.BitSearch extends Enum<PortManager.BitSearch>
Enumeration of search for a BitSet.
  • Enum Constant Details

    • ASCENDING

      public static final PortManager.BitSearch ASCENDING
      Search in an ascending order of bit index.
    • DESCENDING

      public static final PortManager.BitSearch DESCENDING
      Search in a descending order of bit index.
  • Constructor Details

    • BitSearch

      private BitSearch()
  • Method Details

    • values

      public static PortManager.BitSearch[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static PortManager.BitSearch valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • nextFree

      abstract IntUnaryOperator nextFree(BitSet bitSet)
      Gets the function used to search the specified BitSet for the next clear (free) bit.
      Parameters:
      bitSet - the BitSet to search
      Returns:
      an IntUnaryOperator accepting the starting index for the bit search and returning the index of the next clear bit
      See Also:
    • successor

      abstract int successor(int value)
      Advances the value to the next value appropriate for the direction.
    • reverse

      abstract PortManager.BitSearch reverse()
      Gets the BitSearch value that searches in the opposite direction.
      Returns:
      the "opposite" BitSearch instance