org.ahmadsoft.postal
Class USPostalCodeService.MatchOptions

java.lang.Object
  extended by org.ahmadsoft.postal.USPostalCodeService.MatchOptions
Enclosing class:
USPostalCodeService

public static class USPostalCodeService.MatchOptions
extends java.lang.Object

Specifies options for performing an advanced match operation.

Author:
Amin Ahmad

Constructor Summary
USPostalCodeService.MatchOptions(boolean ignoreCapitalization, boolean ignorePunctuation, boolean ignoreWhitespace, int maxMatchLevel)
          Creates a new match option.
 
Method Summary
 int getMaxMatchLevel()
          Returns the maximum match level for a match operation.
 boolean isIgnoreCapitalization()
          Returns true is capitalization should be ignored when computing the distance between two names, and false otherwise.
 boolean isIgnorePunctuation()
          Returns true if punctuation should be ignored when computing the distance between two names, and false otherwise.
 boolean isIgnoreWhitespace()
          Returns true if whitespace should be ignored when computing the distance between two names, and false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

USPostalCodeService.MatchOptions

public USPostalCodeService.MatchOptions(boolean ignoreCapitalization,
                                        boolean ignorePunctuation,
                                        boolean ignoreWhitespace,
                                        int maxMatchLevel)
Creates a new match option.

Parameters:
ignoreCapitalization -
ignorePunctuation -
ignoreWhitespace -
maxMatchLevel -
Method Detail

isIgnoreCapitalization

public boolean isIgnoreCapitalization()
Returns true is capitalization should be ignored when computing the distance between two names, and false otherwise. For example, if the value were true, then the distace between Dallas and dallas would be zero, but if the value were false, then the distace would be one.

Returns:
true is capitalization should be ignored when computing the distance between two names, and false otherwise.

isIgnorePunctuation

public boolean isIgnorePunctuation()
Returns true if punctuation should be ignored when computing the distance between two names, and false otherwise. The punctuation characters are defined as follows: `~!@#$%^&*()_-+=[{]}\|;:'",<.>/?

Returns:
true if punctuation should be ignored when computing the distance between two names, and false otherwise.

isIgnoreWhitespace

public boolean isIgnoreWhitespace()
Returns true if whitespace should be ignored when computing the distance between two names, and false otherwise. If, for example, the value were true, then the match distance between LOSANGELES and LOS ANGELES would be one, and if the value were false, the distance would be zero.

Returns:
true if whitespace should be ignored when computing the distance between two names, and false otherwise.

getMaxMatchLevel

public int getMaxMatchLevel()
Returns the maximum match level for a match operation. Only cities within a postal code that meet the maximum match level are considered for inclusion in the results. Note that CITY_ACTUAL < CITY_ACCEPTABLE < CITY_UNACCEPTABLE.

Returns:
the minimum match level for a match operation.


Copyright © 2006-2009 Ahmadsoft. All Rights Reserved.