java.lang.Object
net.i2p.router.crypto.ratchet.ContainerHelpers

class ContainerHelpersextends Object
Binary search utilities for array operations without argument validation overhead.
  • Constructor Details

    • ContainerHelpers

      private ContainerHelpers()
      Utility class, not intended for instantiation.
  • Method Details

    • binarySearch

      static int binarySearch(char[] array, int size, char value)
      This is Arrays.binarySearch(), but doesn't do any argument validation.
      Parameters:
      array - the sorted array; only the first size entries are examined
      size - how many leading elements of array are sorted and searchable
      value - the character to look for
      Returns:
      the index of value, or -(insertion point) - 1 when it is absent