Class DefaultMatchingRule<T>
- java.lang.Object
-
- com.evolveum.midpoint.prism.impl.match.DefaultMatchingRule<T>
-
- All Implemented Interfaces:
MatchingRule<T>
public class DefaultMatchingRule<T> extends Object implements MatchingRule<T>
Default matching rule used as a fall-back if no explicit matching rule is specified. It is simply using java equals() method to match values.- Author:
- Radovan Semancik
-
-
Constructor Summary
Constructors Constructor Description DefaultMatchingRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QNamegetName()QName that identifies the rule.booleanmatch(T a, T b)Matches two objects.booleanmatchRegex(T a, String regex)Matches value against given regex.Tnormalize(T original)Returns a normalized version of the value.booleansupports(QName xsdType)Returns true if the rule can be applied to the specified XSD type.StringtoString()
-
-
-
Method Detail
-
getName
public QName getName()
Description copied from interface:MatchingRuleQName that identifies the rule. This QName may be used to refer to this specific matching rule, it is an matching rule identifier.- Specified by:
getNamein interfaceMatchingRule<T>
-
supports
public boolean supports(QName xsdType)
Description copied from interface:MatchingRuleReturns true if the rule can be applied to the specified XSD type.- Specified by:
supportsin interfaceMatchingRule<T>
-
match
public boolean match(T a, T b)
Description copied from interface:MatchingRuleMatches two objects.- Specified by:
matchin interfaceMatchingRule<T>
-
normalize
public T normalize(T original)
Description copied from interface:MatchingRuleReturns a normalized version of the value. For normalized version the following holds: if A matches B then normalize(A) == normalize(B)- Specified by:
normalizein interfaceMatchingRule<T>
-
matchRegex
public boolean matchRegex(T a, String regex)
Description copied from interface:MatchingRuleMatches value against given regex.- Specified by:
matchRegexin interfaceMatchingRule<T>
-
-