Interface ValueReader
public interface ValueReader
Represents a reader of values from a
Reader
to a Map
of primitive options (using
String
as a key). When it is implemented, it should implement 1 of the 2 methods,
otherwise a IllegalArgumentException
is thrown if none of the methods is implemented.- Since:
- 2.0.0
- Author:
- MrIvanPlays
-
Method Summary
Modifier and TypeMethodDescriptionShould read the specified reader to a Map.read
(Reader reader, CustomOptions customOptions) Should read the specified reader to a Map.read
(Reader reader, CustomOptions customOptions, LoadSettings loadSettings) Should read the specified reader to a Map.
-
Method Details
-
read
Should read the specified reader to a Map.- Parameters:
reader
- the reader we need read- Returns:
- the values read, represented as a map, or empty map if no values have been read
- Throws:
IOException
- if an io occurs
-
read
Should read the specified reader to a Map. Can use the specifiedCustomOptions
to manipulate the output of this method, or the ways the reader is parsed to the needed output.- Parameters:
reader
- the reader we need readcustomOptions
- the read options- Returns:
- the values read, represented as a map, or empty map if no values have been read
- Throws:
IOException
- if an io occurs
-
read
default Map<String,Object> read(Reader reader, CustomOptions customOptions, LoadSettings loadSettings) throws IOException Should read the specified reader to a Map. Can use the specifiedCustomOptions
andLoadSettings
to manipulate the output of this method, or the ways the reader is parsed to the needed output.- Parameters:
reader
- the reader we need readcustomOptions
- the read optionsloadSettings
- the load settings- Returns:
- the values read, represented as a map, or empty map if no values have been read
- Throws:
IOException
- if an io occurs
-