Class StringJsonParser<T>
java.lang.Object
org.woftnw.eof.io.parse.common.string.StringJsonParser<T>
- Type Parameters:
T- The type to parse to.
- All Implemented Interfaces:
JsonParser<T>
- Direct Known Subclasses:
NamespaceJsonParser, StringToStringJsonParser
Parses a JSON string in some way.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final String[]The patterns that a given string must match all of.protected final String[]The patterns that a given string must match one of.protected static final intThe default maximum string length.protected static final intThe default minimum string length.protected final intThe maximum string length.protected final intThe minimum string length. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStringJsonParser(int minLength, int maxLength, String pattern) Create a StringJsonParser with the default minimum and maximum lengths.protectedStringJsonParser(int minLength, int maxLength, String[] anyOfPatterns, String[] allOfPatterns) Create a StringJsonParser with the default minimum and maximum lengths.protectedStringJsonParser(String pattern) Create a StringJsonParser with the default minimum and maximum lengths.protectedStringJsonParser(String[] anyOfPatterns, String[] allOfPatterns) Create a StringJsonParser with the default minimum and maximum lengths. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JsonParser
parse
-
Field Details
-
DEFAULT_MIN_LENGTH
protected static final int DEFAULT_MIN_LENGTHThe default minimum string length.- See Also:
-
DEFAULT_MAX_LENGTH
protected static final int DEFAULT_MAX_LENGTHThe default maximum string length.- See Also:
-
MIN_LENGTH
protected final int MIN_LENGTHThe minimum string length. -
MAX_LENGTH
protected final int MAX_LENGTHThe maximum string length. -
ANY_OF_PATTERNS
The patterns that a given string must match one of. If this is an empty array, none will be needed. -
ALL_OF_PATTERNS
The patterns that a given string must match all of.
-
-
Constructor Details
-
StringJsonParser
protected StringJsonParser(int minLength, int maxLength, String[] anyOfPatterns, String[] allOfPatterns) Create a StringJsonParser with the default minimum and maximum lengths.- Parameters:
minLength- The minimum string length.maxLength- The maximum string length.anyOfPatterns- The patterns that a given string must match one of. If this is an empty array, none will be needed.allOfPatterns- The patterns that a given string must match all of.
-
StringJsonParser
Create a StringJsonParser with the default minimum and maximum lengths.- Parameters:
minLength- The minimum string length.maxLength- The maximum string length.pattern- The pattern that a given string must match.
-
StringJsonParser
Create a StringJsonParser with the default minimum and maximum lengths.- Parameters:
pattern- The pattern that a given string must match.
-
StringJsonParser
Create a StringJsonParser with the default minimum and maximum lengths.- Parameters:
anyOfPatterns- The patterns that a given string must match one of. If this is an empty array, none will be needed.allOfPatterns- The patterns that a given string must match all of.
-