arraymatcher.js
No description.

File Location

/goog/ui/ac/arraymatcher.js

Classes

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

Public Protected Private

Global Functions

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 »

Directory ac

File Reference