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 Details

    • read

      default Map<String,Object> read(Reader reader) throws IOException
      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

      default Map<String,Object> read(Reader reader, CustomOptions customOptions) throws IOException
      Should read the specified reader to a Map. Can use the specified CustomOptions to manipulate the output of this method, or the ways the reader is parsed to the needed output.
      Parameters:
      reader - the reader we need read
      customOptions - 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 specified CustomOptions and LoadSettings to manipulate the output of this method, or the ways the reader is parsed to the needed output.
      Parameters:
      reader - the reader we need read
      customOptions - the read options
      loadSettings - 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