net.sourceforge.wurfl.core.strategy
Class RISMatcher
java.lang.Object
net.sourceforge.wurfl.core.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 934 2012-03-27 13:34:26Z fulvio.crivellaro $
INSTANCE
public static final RISMatcher INSTANCE
- Singleton instance
getName
public String getName()
- Specified by:
getName in interface StringMatcher
match
public String match(Set<String> 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 Set 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 © 2012 ScientiaMobile Inc.. All Rights Reserved.