com.cafesoft.core.field
Interface FieldValuePattern

All Known Implementing Classes:
IntegerFieldValuePattern, StringFieldValuePattern

public interface FieldValuePattern

Defines an Object that is mechanism for specifying value patterns for field objects. For instance, a StringFieldValuePattern contains rules for matching String values.

Since:
7/30/03

Method Summary
 String getPattern()
          Get a String representation of the pattern.
 boolean matches(Object fieldValue)
          Check for a pattern match.
 BigDecimal score()
          Get the score of the FieldValuePattern.
 

Method Detail

matches

public boolean matches(Object fieldValue)
Check for a pattern match.

Returns:
true if this FieldValuePattern matches the specified field value else return false.

getPattern

public String getPattern()
Get a String representation of the pattern.

Returns:
a String representation of the pattern.

score

public BigDecimal score()
Get the score of the FieldValuePattern.

The FieldValuePattern's score is a value that determines how specific a particular a pattern is. It is a mechanism that allows the implementor to decided how specific a pattern is. For example, a concrete string value of "abcde" is much more specific than a string that contains a wildcard such as "abcd*". Therefore, this method allows for the calculation of that value.

Returns:
a BigDecimal object that contains this FieldValuePattern objects score.


Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.