Package com.isomorphic.criteria

# Class SimpleCriteria

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
com.isomorphic.criteria.SimpleCriteria

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Map`

public class SimpleCriteria extends HashMap
SimpleCriteria is a format for representing search criteria as simple key-value pairs.

Matching logic depends on textMatchStyle parameter passed into methods.

For more complex logic when different operators should be used or several criteria should be combine by logic operator use `AdvancedCriteria`.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `TEXT_MATCH_STYLE_STARTS_WITH`
  TextMatchStyle for check that actual value should starts with passed value string.
  `static final String`
  `TEXT_MATCH_STYLE_SUBSTRING`
  TextMatchStyle for check that actual value contain passed value string.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleCriteria(Map map)`
  Construct criteria using key-values pairs.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `valuesMatchCriteria(Map values, String textMatchStyle)`
  Check that values in map match current criteria using passed textMatchStyle.

- ## Field Details

  - ### TEXT_MATCH_STYLE_STARTS_WITH

    public static final String TEXT_MATCH_STYLE_STARTS_WITH
    TextMatchStyle for check that actual value should starts with passed value string.
    See Also:
      - Constant Field Values

  - ### TEXT_MATCH_STYLE_SUBSTRING

    public static final String TEXT_MATCH_STYLE_SUBSTRING
    TextMatchStyle for check that actual value contain passed value string.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### SimpleCriteria

    public SimpleCriteria(Map map)
    Construct criteria using key-values pairs.
    Parameters:
      `map` - - map of key-values pairs.

- ## Method Details

  - ### valuesMatchCriteria

    public boolean valuesMatchCriteria(Map values, String textMatchStyle)
    Check that values in map match current criteria using passed textMatchStyle.
    Parameters:
      `values` - - values to check.
      `textMatchStyle` - - textMatchStyle to use.
    Returns:
      if values match criteria.