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
Method Summary |
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 |
values
protected final DocumentValueFactory values
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
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-2012 JBoss, a division of Red Hat. All Rights Reserved.