Package app.babylon.table.column.type
Interface TypeParser<T>
- Type Parameters:
T- the object value type produced byparse(CharSequence)
public interface TypeParser<T>
Parses textual values into a target typed value.
-
Method Summary
Modifier and TypeMethodDescriptionParses a whole character sequence into an object value.default Tparse(CharSequence s, int offset, int length) Parses a slice of a character sequence into an object value.default byteParses a whole character sequence into a byte value.default byteparseByte(CharSequence s, int offset, int length) Parses a slice of a character sequence into a byte value.default doubleParses a whole character sequence into a double value.default doubleparseDouble(CharSequence s, int offset, int length) Parses a slice of a character sequence into a double value.default intParses a whole character sequence into an int value.default intparseInt(CharSequence s, int offset, int length) Parses a slice of a character sequence into an int value.default longParses a whole character sequence into a long value.default longparseLong(CharSequence s, int offset, int length) Parses a slice of a character sequence into a long value.
-
Method Details
-
parse
Parses a whole character sequence into an object value.- Parameters:
s- the source text- Returns:
- the parsed value, or
nullwhen parsing fails
-
parse
Parses a slice of a character sequence into an object value.- Parameters:
s- the source textoffset- the start indexlength- the slice length- Returns:
- the parsed value, or
nullwhen parsing fails
-
parseByte
Parses a whole character sequence into a byte value.- Parameters:
s- the source text- Returns:
- the parsed byte
-
parseByte
Parses a slice of a character sequence into a byte value.- Parameters:
s- the source charactersoffset- the start indexlength- the slice length- Returns:
- the parsed byte
-
parseInt
Parses a whole character sequence into an int value.- Parameters:
s- the source text- Returns:
- the parsed int
-
parseInt
Parses a slice of a character sequence into an int value.- Parameters:
s- the source textoffset- the start indexlength- the slice length- Returns:
- the parsed int
-
parseLong
Parses a whole character sequence into a long value.- Parameters:
s- the source text- Returns:
- the parsed long
-
parseLong
Parses a slice of a character sequence into a long value.- Parameters:
s- the source textoffset- the start indexlength- the slice length- Returns:
- the parsed long
-
parseDouble
Parses a whole character sequence into a double value.- Parameters:
s- the source text- Returns:
- the parsed double
-
parseDouble
Parses a slice of a character sequence into a double value.- Parameters:
s- the source textoffset- the start indexlength- the slice length- Returns:
- the parsed double
-