Package org.midheaven.lang
Class Parser<T>
java.lang.Object
org.midheaven.lang.Parser<T>
- Type Parameters:
T- the type being parsed
Represents Parser.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancontainsIllegalChars(String text) Checks whether contains Illegal Chars.static <X> Parser<X> Performs lowerCode.protected booleanmatchesExpectedPattern(String text) Checks whether matches Expected Pattern.static <X> Parser<X> numericCode(Function<String, X> factory) Performs numericCode.final TParses the provided value.protected abstract StringremoveIllegalChars(String text) Performs remove Illegal Chars.Performs tryParse.static <X> Parser<X> Performs upperCode.protected abstract TPerforms wrap.
-
Constructor Details
-
Parser
public Parser()
-
-
Method Details
-
lowerCode
Performs lowerCode.- Parameters:
factory- the factory value- Returns:
- the result of lowerCode
-
upperCode
Performs upperCode.- Parameters:
factory- the factory value- Returns:
- the result of upperCode
-
numericCode
Performs numericCode.- Parameters:
factory- the factory value- Returns:
- the result of numericCode
-
parse
Parses the provided value.- Parameters:
text- the text value- Returns:
- the result of parse
-
tryParse
Performs tryParse.- Parameters:
text- the text value- Returns:
- the result of tryParse
-
matchesExpectedPattern
Checks whether matches Expected Pattern.- Parameters:
text- the text value- Returns:
- the result of matchesExpectedPattern
-
containsIllegalChars
Checks whether contains Illegal Chars.- Parameters:
text- the text value- Returns:
- the result of containsIllegalChars
-
removeIllegalChars
Performs remove Illegal Chars.- Parameters:
text- the text value- Returns:
- the result of removeIllegalChars
-
wrap
Performs wrap.- Parameters:
text- the text value- Returns:
- the result of wrap
-