Package ftbsc.lll.mapper
Interface IMappingFormat
-
- All Known Implementing Classes:
MultiMapper
,SRGMapper
,TinyV2Mapper
,TSRGMapper
public interface IMappingFormat
The shared interface between all mappers.
-
-
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 aMapper
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 aMapper
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 toclaim
a given mapping file.- Returns:
- the priority
-
getMapper
Mapper getMapper(java.util.List<java.lang.String> lines, boolean ignoreErrors) throws MalformedMappingsException
Creates aMapper
given the lines, ignoring errors depending on the given flag.- Parameters:
lines
- the lines to readignoreErrors
- 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 aMapper
given the lines, ignoring errors depending on the given flag, and returns its inverted form.- Parameters:
lines
- the lines to readignoreErrors
- try to ignore errors and keep going- Returns:
- the inverted
Mapper
- Throws:
MalformedMappingsException
- if an error is encountered and ignoreErrors is false
-
-