com.virtuosotechnologies.asaph.model.opsemantics
Class SearchParameters

java.lang.Object
  extended bycom.virtuosotechnologies.asaph.model.opsemantics.SearchParameters

public class SearchParameters
extends Object

Description of what to search for


Nested Class Summary
static class SearchParameters.PositionConstraint
          PositionConstraint
static class SearchParameters.Strength
          Strength
 
Field Summary
static SearchParameters.Strength ACCENT_SENSITIVE_STRENGTH
          Synonym of SECONDARY_STRENGTH
static SearchParameters.Strength CASE_SENSITIVE_STRENGTH
          Synonym of TERTIARY_STRENGTH
static SearchParameters.PositionConstraint CONTAINS
          Indicates that matches should match "contains"
static SearchParameters.PositionConstraint ENDS_WITH
          Indicates that matches should match "ends with"
static SearchParameters.PositionConstraint EQUALS
          Indicates that matches should match the entire value
static SearchParameters.Strength INSENSITIVE_STRENGTH
          Synonym of PRIMARY_STRENGTH
static SearchParameters.Strength PRIMARY_STRENGTH
          Strength value indicating that only primary differences are significant.
static SearchParameters.Strength SECONDARY_STRENGTH
          Strength value indicating that primary and secondary differences are significant.
static SearchParameters.PositionConstraint STARTS_WITH
          Indicates that matches should match "starts with"
static SearchParameters.Strength TERTIARY_STRENGTH
          Strength value indicating that primary, secondary and tertiary differences are significant.
 
Constructor Summary
SearchParameters(SearchParameters.PositionConstraint position, String text, SearchParameters.Strength strength)
          Constructor
 
Method Summary
 boolean equals(Object obj)
          equals
 SearchParameters.PositionConstraint getPositionConstraint()
          Get the search position constraint
 SearchParameters.Strength getStrength()
          Get the search strength (i.e. case-sensitivity, etc.)
 String getText()
          Get text to search for
 int hashCode()
          hashCode
 boolean matches(String str)
          Match these search parameters against a string
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRIMARY_STRENGTH

public static final SearchParameters.Strength PRIMARY_STRENGTH
Strength value indicating that only primary differences are significant. (e.g. "a" vs "b".) This is similar to Collator.PRIMARY.


SECONDARY_STRENGTH

public static final SearchParameters.Strength SECONDARY_STRENGTH
Strength value indicating that primary and secondary differences are significant. (e.g. "a" vs "b" and "a" vs "a-umlaut".) This is similar to Collator.SECONDARY.


TERTIARY_STRENGTH

public static final SearchParameters.Strength TERTIARY_STRENGTH
Strength value indicating that primary, secondary and tertiary differences are significant. (e.g. "a" vs "b", "a" vs "a-umlaut", and "a" vs "A".) This is similar to Collator.TERTIARY.


INSENSITIVE_STRENGTH

public static final SearchParameters.Strength INSENSITIVE_STRENGTH
Synonym of PRIMARY_STRENGTH


ACCENT_SENSITIVE_STRENGTH

public static final SearchParameters.Strength ACCENT_SENSITIVE_STRENGTH
Synonym of SECONDARY_STRENGTH


CASE_SENSITIVE_STRENGTH

public static final SearchParameters.Strength CASE_SENSITIVE_STRENGTH
Synonym of TERTIARY_STRENGTH


EQUALS

public static final SearchParameters.PositionConstraint EQUALS
Indicates that matches should match the entire value


CONTAINS

public static final SearchParameters.PositionConstraint CONTAINS
Indicates that matches should match "contains"


STARTS_WITH

public static final SearchParameters.PositionConstraint STARTS_WITH
Indicates that matches should match "starts with"


ENDS_WITH

public static final SearchParameters.PositionConstraint ENDS_WITH
Indicates that matches should match "ends with"

Constructor Detail

SearchParameters

public SearchParameters(SearchParameters.PositionConstraint position,
                        String text,
                        SearchParameters.Strength strength)
Constructor

Method Detail

getText

public String getText()
Get text to search for


getStrength

public SearchParameters.Strength getStrength()
Get the search strength (i.e. case-sensitivity, etc.)


getPositionConstraint

public SearchParameters.PositionConstraint getPositionConstraint()
Get the search position constraint


matches

public boolean matches(String str)
Match these search parameters against a string


equals

public boolean equals(Object obj)
equals


hashCode

public int hashCode()
hashCode