Class CharSequenceSuffixTree.CharSequenceNode

    • Constructor Detail

      • CharSequenceNode

        public CharSequenceNode​(int index)
        Index constructor.
        Parameters:
        index - The index of the node.
    • Method Detail

      • getEdge

        public CharSequenceSuffixTree.CharSequenceEdge getEdge​(char firstChar)
        Retrieves the edge that extends from this and starts with the given character.
        Parameters:
        firstChar - The first character along the edge.
        Returns:
        The edge extending from the node starting with the given character, or null if the node has no such edge.
      • startsWith

        public boolean startsWith​(java.lang.CharSequence charSequence)
        Compares a character sequence with the characters starting at this node and continuing along child edges.
        Parameters:
        charSequence - The character sequence to compare.
        Returns:
        true if there is a path matching the given character sequence starting at this node and continuing along child edges.
        See Also:
        CharSequenceSuffixTree.CharSequenceEdge.startsWith(CharSequence)
      • startsWith

        public boolean startsWith​(java.lang.CharSequence charSequence,
                                  int start,
                                  int end)
        Compares part of a character sequence with the characters starting at this node and continuing along child edges.
        Parameters:
        charSequence - The character sequence to compare.
        start - The start of the character sequence to compare, inclusive.
        end - The end of the character sequence to compare, exclusive.
        Returns:
        true if there is a path matching the given character sequence starting at this node and continuing along child edges.
        Throws:
        java.lang.StringIndexOutOfBoundsException - if start or end are negative or greater than length(), or start is greater than end.
        See Also:
        CharSequenceSuffixTree.CharSequenceEdge.startsWith(CharSequence, int, int)