summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/mapper/impl/TinyV2Mapper.java
diff options
context:
space:
mode:
author zaaarf <zaaarf@proton.me>2023-08-26 23:20:06 +0200
committer zaaarf <zaaarf@proton.me>2023-08-26 23:20:06 +0200
commit6ec42321a36bb44f71ca27a52c774a8dee21ef08 (patch)
tree88a10ae36e82be9b75e865026c4bdb8d9440f7d7 /src/main/java/ftbsc/lll/mapper/impl/TinyV2Mapper.java
parent27ff8340f3435459ee21babaceef22f59b7a84f6 (diff)
feat: heavily reworked api to provide data instead of names
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();
+ }
}