net.sourceforge.javamatch.query
Class Contains

java.lang.Object
  extended bynet.sourceforge.javamatch.query.MatchQuery
      extended bynet.sourceforge.javamatch.query.StringQuery
          extended bynet.sourceforge.javamatch.query.Contains

public class Contains
extends StringQuery

Class Contains is a query that check if a string member of an object to match contains a certain substring


Constructor Summary
Contains(java.lang.String memberName, java.lang.String matchValue)
          Creates a new Contains-query, that checks the given member name for the given match value
 
Method Summary
 float getMatchValue(java.lang.Object targetObject)
          Returns the match value of this match query, when executed on the given object.
 
Methods inherited from class net.sourceforge.javamatch.query.StringQuery
getValue
 
Methods inherited from class net.sourceforge.javamatch.query.MatchQuery
getObjectValue, isTwoPass, prePass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Contains

public Contains(java.lang.String memberName,
                java.lang.String matchValue)
Creates a new Contains-query, that checks the given member name for the given match value

Parameters:
memberName - the name of the member that is matched
matchValue - the value against which is matched
Method Detail

getMatchValue

public float getMatchValue(java.lang.Object targetObject)
                    throws MatchException
Returns the match value of this match query, when executed on the given object.

Specified by:
getMatchValue in class MatchQuery
Parameters:
targetObject - the object agains which the query is executed
Returns:
A value between 0 and 1, both inclusive, that indicates how good the object matches this query. 0 means a mismatch, 1 means a full match
Throws:
MatchException - when the value could not be retrieved

Hosted by SourceForge.net/