Interface IMappingFormat

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean claim​(java.util.List<java.lang.String> lines)
      Checks whether this mapper can process the given lines.
      default Mapper getInvertedMapper​(java.util.List<java.lang.String> lines, boolean ignoreErrors)
      Creates a Mapper given the lines, ignoring errors depending on the given flag, and returns its inverted form.
      Mapper getMapper​(java.util.List<java.lang.String> lines, boolean ignoreErrors)
      Creates a Mapper given the lines, ignoring errors depending on the given flag.
      default int priority()
      Defines a priority for this implementation: the higher the number, the higher the priority.
    • Method Detail

      • claim

        boolean claim​(java.util.List<java.lang.String> lines)
        Checks whether this mapper can process the given lines.
        Parameters:
        lines - the lines to read
        Returns:
        whether this type of mapper can process these lines
      • priority

        default int priority()
        Defines a priority for this implementation: the higher the number, the higher the priority. This is used to resolve conflicts when multiple mappers attempt to claim a given mapping file.
        Returns:
        the priority
      • getMapper

        Mapper getMapper​(java.util.List<java.lang.String> lines,
                         boolean ignoreErrors)
                  throws MalformedMappingsException
        Creates a Mapper given the lines, ignoring errors depending on the given flag.
        Parameters:
        lines - the lines to read
        ignoreErrors - try to ignore errors and keep going
        Returns:
        the Mapper
        Throws:
        MalformedMappingsException - if an error is encountered and ignoreErrors is false
      • getInvertedMapper

        default Mapper getInvertedMapper​(java.util.List<java.lang.String> lines,
                                         boolean ignoreErrors)
                                  throws MalformedMappingsException
        Creates a Mapper given the lines, ignoring errors depending on the given flag, and returns its inverted form.
        Parameters:
        lines - the lines to read
        ignoreErrors - try to ignore errors and keep going
        Returns:
        the inverted Mapper
        Throws:
        MalformedMappingsException - if an error is encountered and ignoreErrors is false