ui.ac.ArrayMatcher Extends
Basic class for matching words in an array

Inheritance

Constructor

goog.ui.ac.ArrayMatcher(rowsopt_noSimilar)

Parameters

rows : Array
Dictionary of items to match. Can be objects if they have a toString method that returns the value to match against.
opt_noSimilar : boolean=
if true, do not do similarity matches for the input token against the dictionary.

Instance Methods

Public Protected Private
getPrefixMatches(tokenmaxMatches) !Array
Matches the token against the start of words in the row.
Arguments:
token : string
Token to match.
maxMatches : number
Max number of matches to return.
Returns: !Array  Rows that match.
code »
getSimilarRows(tokenmaxMatches) !Array
Matches the token against similar rows, by calculating "distance" between the terms.
Arguments:
token : string
Token to match.
maxMatches : number
Max number of matches to return.
Returns: !Array  The best maxMatches rows.
code »
requestMatchingRows(tokenmaxMatchesmatchHandleropt_fullString)
Function used to pass matches to the autocomplete
Arguments:
token : string
Token to match.
maxMatches : number
Max number of matches to return.
matchHandler : Function
callback to execute after matching.
opt_fullString : string=
The full string from the input box.
code »
setRows(rows)
Replaces the rows that this object searches over.
Arguments:
rows : Array
Dictionary of items to match.
code »

Instance Properties

rows_ :
No description.
Code »
useSimilar_ :
No description.
Code »

Static Methods

goog.ui.ac.ArrayMatcher.getMatchesForRows(tokenmaxMatchesrows) !Array
Matches the token against the specified rows, first looking for prefix matches and if that fails, then looking for similar matches.
Arguments:
token : string
Token to match.
maxMatches : number
Max number of matches to return.
rows : !Array
Rows to search for matches. Can be objects if they have a toString method that returns the value to match against.
Returns: !Array  Rows that match.
code »
goog.ui.ac.ArrayMatcher.getPrefixMatchesForRows(tokenmaxMatchesrows) !Array
Matches the token against the start of words in the row.
Arguments:
token : string
Token to match.
maxMatches : number
Max number of matches to return.
rows : !Array
Rows to search for matches. Can be objects if they have a toString method that returns the value to match against.
Returns: !Array  Rows that match.
code »
goog.ui.ac.ArrayMatcher.getSimilarMatchesForRows(tokenmaxMatchesrows) !Array
Matches the token against similar rows, by calculating "distance" between the terms.
Arguments:
token : string
Token to match.
maxMatches : number
Max number of matches to return.
rows : !Array
Rows to search for matches. Can be objects if they have a toString method that returns the value to match against.
Returns: !Array  The best maxMatches rows.
code »

Package ui.ac

Package Reference