au.id.pbw.hyfo.hyph
Class Subsearch

java.lang.Object
  extended by au.id.pbw.hyfo.hyph.Subsearch

public class Subsearch
extends Object

A class representing the results of a partial search. It encapsulates the node at which an intermediate result was found, the array of Unicode codepoints expressing the complete key being sought, and an index representing the point in the key at which this intermediate result was located.

If a search is resumed after an intermediate result is found, it must be noted that the index points to the last successful match, so the search must resume on the eql branch of the node, using the next codepoint of the key.

Author:
pbw

Constructor Summary
Subsearch(int start_node, int[] key, int index, int data_ptr)
          Constructs a new Subsearch.
 
Method Summary
 int get_data_ptr()
          Gets the data_ptr value from the subsearch node.
 int get_index()
          Gets the index of the character associated with the node in this subsearch.
 int[] get_key()
          Gets the key used in this search.
 int get_node()
          Gets the last node located in the search.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Subsearch

public Subsearch(int start_node,
                 int[] key,
                 int index,
                 int data_ptr)
Constructs a new Subsearch.

Parameters:
data_ptr - the data_ptr value for the node.
start_node - the node from which the next subsearch starts.
key - the key being searched for substrings.
index - the character in the key that is associated with the start_node.
Method Detail

get_node

public int get_node()
Gets the last node located in the search.

Returns:
the last node located in this search.

get_index

public int get_index()
Gets the index of the character associated with the node in this subsearch.

Returns:
the index of the last character located in the search.

get_key

public int[] get_key()
Gets the key used in this search.

Returns:
the key as an array of Unicode codepoints.

get_data_ptr

public int get_data_ptr()
Gets the data_ptr value from the subsearch node.

Returns:
returns the data_ptr value.


Copyright © 2005-2006 Peter B. West.