Class ByteTrieOfOne

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

final class ByteTrieOfOne extends Object implements ByteTrie
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final byte[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    match(byte[] str)
    Searches for the longest matching string in the trie that matches the provided string.
    int
    match(byte[] str, int startIndex, int endIndex)
    Searches for the longest matching string in the trie that matches the provided string.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • chars

      private final byte[] chars
  • Constructor Details

    • ByteTrieOfOne

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

    • match

      public int match(byte[] str)
      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 in the form of a byte array
      Returns:
      the length of the longest matching string, or 0 if no string matches
    • 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