aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/mapper/impl/TinyV2Mapper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/ftbsc/lll/mapper/impl/TinyV2Mapper.java')
-rw-r--r--src/main/java/ftbsc/lll/mapper/impl/TinyV2Mapper.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/main/java/ftbsc/lll/mapper/impl/TinyV2Mapper.java b/src/main/java/ftbsc/lll/mapper/impl/TinyV2Mapper.java
index 37c8f80..d27756d 100644
--- a/src/main/java/ftbsc/lll/mapper/impl/TinyV2Mapper.java
+++ b/src/main/java/ftbsc/lll/mapper/impl/TinyV2Mapper.java
@@ -15,26 +15,14 @@ import java.util.regex.Pattern;
@AutoService(IMapper.class)
public class TinyV2Mapper extends AbstractMapper {
- /**
- * Checks whether this mapper can process the given lines.
- * @param lines the lines to read
- * @return whether this type of mapper can process these lines
- */
@Override
public boolean claim(List<String> lines) {
return Pattern.compile("tiny\t2\t[0-9]\t[a-zA-Z]*\t[a-zA-Z]*")
.matcher(lines.get(0)).matches();
}
- /**
- * Reads the given lines of text and attempts to interpret them as
- * mappings of the given type.
- * @param lines the lines to read
- * @param ignoreErrors try to ignore errors and keep going
- * @throws MalformedMappingsException if an error is encountered and ignoreErrors is false
- */
@Override
- protected void processLines(List<String> lines, boolean ignoreErrors) throws MalformedMappingsException {
+ public void populate(List<String> lines, boolean ignoreErrors) throws MalformedMappingsException {
String currentClass = "";
for(int i = 1; i < lines.size(); i++) {
String currentLine = lines.get(i);
@@ -76,4 +64,9 @@ public class TinyV2Mapper extends AbstractMapper {
throw new MalformedMappingsException(i, "wrong number of space-separated tokens");
}
}
+
+ @Override
+ protected AbstractMapper newInstance() {
+ return new TinyV2Mapper();
+ }
}