java.lang.Object
ch.randelshofer.fastdoubleparser.chr.CharTrieOfOne
All Implemented Interfaces:
CharTrie

final class CharTrieOfOne extends Object implements CharTrie
  • Field Summary

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

    Constructors
    Constructor
    Description
    CharTrieOfOne(char[] chars)
     
     
  • Method Summary

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

    Methods inherited from class java.lang.Object

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

    • chars

      private final char[] chars
  • Constructor Details

    • CharTrieOfOne

      public CharTrieOfOne(Set<String> set)
    • CharTrieOfOne

      public CharTrieOfOne(char[] chars)
  • Method Details

    • match

      public int match(CharSequence str)
      Description copied from interface: CharTrie
      Searches for the longest matching string in the trie that matches the provided string.
      Specified by:
      match in interface CharTrie
      Parameters:
      str - a string in the form of a CharSequence
      Returns:
      the length of the longest matching string, or 0 if no string matches
    • match

      public int match(CharSequence str, int startIndex, int endIndex)
      Description copied from interface: CharTrie
      Searches for the longest matching string in the trie that matches the provided string.
      Specified by:
      match in interface CharTrie
      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
    • match

      public int match(char[] str)
      Description copied from interface: CharTrie
      Searches for the longest matching string in the trie that matches the provided string.
      Specified by:
      match in interface CharTrie
      Parameters:
      str - a string in the form of a char array
      Returns:
      the length of the longest matching string, or 0 if no string matches
    • match

      public int match(char[] str, int startIndex, int endIndex)
      Description copied from interface: CharTrie
      Searches for the longest matching string in the trie that matches the provided string.
      Specified by:
      match in interface CharTrie
      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