java.lang.Object
ch.randelshofer.fastdoubleparser.bte.ByteTrieOfFew
All Implemented Interfaces:
ByteTrie

final class ByteTrieOfFew extends Object implements ByteTrie
A trie for testing if a String is contained in a set of Strings.
  • Field Details

  • Constructor Details

    • ByteTrieOfFew

      public ByteTrieOfFew(Set<String> set)
  • Method Details

    • add

      private void add(String str)
    • match

      public int match(byte[] str, int startIndex, int endIndex)
      Description copied from interface: ByteTrie
      Searches for the longest matching string in the trie that matches the provided string.
      Specified by:
      match in interface ByteTrie
      Parameters:
      str - a string
      startIndex - start index (inclusive)
      endIndex - end index (exclusive)
      Returns:
      the length of the longest matching string, or 0 if no string matches