org.infinispan.schematic.internal.document

## Class JsonReader.SimpleValueMatcher

- java.lang.Object
- - org.infinispan.schematic.internal.document.JsonReader.SimpleValueMatcher

- All Implemented Interfaces:
    JsonReader.ValueMatcher
  Direct Known Subclasses:
    JsonReader.DateValueMatcher
  Enclosing class:
    JsonReader

      @NotThreadSafe
      public static class JsonReader.SimpleValueMatcher
      extends Object
      implements JsonReader.ValueMatcher

  The component that matches a string value for certain patterns. If the value matches a known pattern, it return the appropriate value object; otherwise, the supplied string value is returned.
  Since:
    5.1

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected DocumentValueFactory` | `values`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsonReader.SimpleValueMatcher(DocumentValueFactory values)` Create a new matcher that uses the supplied `DocumentValueFactory` instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `parseValue(String value)` Parse the value given by the supplied string into an appropriate value object.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### values

          protected final DocumentValueFactory values

  - ### Constructor Detail

    - #### JsonReader.SimpleValueMatcher

          public JsonReader.SimpleValueMatcher(DocumentValueFactory values)

      Create a new matcher that uses the supplied `DocumentValueFactory` instance.
      Parameters:
        `values` - the factory for creating value objects; may not be null

  - ### Method Detail

    - #### parseValue

          public Object parseValue(String value)

      Parse the value given by the supplied string into an appropriate value object. This method looks for specific patterns of Date strings; if no known pattern is found, it just returns the supplied value.
      Specified by:
        `parseValue` in interface `JsonReader.ValueMatcher`
      Parameters:
        `value` - the string representation of the value
      Returns:
        the value

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.