net.sourceforge.wurfl.core.handlers.matchers.strategy
Class RISMatcher
java.lang.Object
net.sourceforge.wurfl.core.handlers.matchers.strategy.RISMatcher
- All Implemented Interfaces:
- StringMatcher
public final class RISMatcher
- extends Object
- implements StringMatcher
Singleton class applying RIS matcher strategy.
Searches for the string which has the longest common substring with the given
key
- Version:
- $Id: RISMatcher.java 432 2010-05-06 12:12:53Z filippo.deluca $
- Author:
- Fantayeneh Asres Gizaw, Filippo De Luca
INSTANCE
public static final RISMatcher INSTANCE
- Singleton instance
getName
public String getName()
match
public String match(SortedSet candidates,
String needle,
int tolerance)
- Searches for the string which has the longest common substring with the
given needle. If there is not candidates within given tolerance, it
returns null.
- Specified by:
match in interface StringMatcher
- Parameters:
candidates - The SortedSet of possible candidates.needle - The String to match.tolerance - the tolerance between needle and candidates.
- Returns:
- Matched candidate String.
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2008-2010 WURFL-Pro srl. All Rights Reserved.