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

public abstract class StringJsonParser<T> extends Object implements JsonParser<T>
Parses a JSON string in some way.
  • Field Details

    • DEFAULT_MIN_LENGTH

      protected static final int DEFAULT_MIN_LENGTH
      The default minimum string length.
      See Also:
    • DEFAULT_MAX_LENGTH

      protected static final int DEFAULT_MAX_LENGTH
      The default maximum string length.
      See Also:
    • MIN_LENGTH

      protected final int MIN_LENGTH
      The minimum string length.
    • MAX_LENGTH

      protected final int MAX_LENGTH
      The maximum string length.
    • ANY_OF_PATTERNS

      protected final String[] 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

      protected final String[] 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

      protected StringJsonParser(int minLength, int maxLength, String pattern)
      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

      protected StringJsonParser(String pattern)
      Create a StringJsonParser with the default minimum and maximum lengths.
      Parameters:
      pattern - The pattern that a given string must match.
    • StringJsonParser

      protected StringJsonParser(String[] anyOfPatterns, String[] allOfPatterns)
      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.