aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/mapper/impl/TSRGMapper.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/TSRGMapper.java
parent27ff8340f3435459ee21babaceef22f59b7a84f6 (diff)
feat: heavily reworked api to provide data instead of names
Diffstat (limited to 'src/main/java/ftbsc/lll/mapper/impl/TSRGMapper.java')
-rw-r--r--src/main/java/ftbsc/lll/mapper/impl/TSRGMapper.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/main/java/ftbsc/lll/mapper/impl/TSRGMapper.java b/src/main/java/ftbsc/lll/mapper/impl/TSRGMapper.java
index ad4c65e..9cd96d1 100644
--- a/src/main/java/ftbsc/lll/mapper/impl/TSRGMapper.java
+++ b/src/main/java/ftbsc/lll/mapper/impl/TSRGMapper.java
@@ -16,25 +16,13 @@ import java.util.List;
@AutoService(IMapper.class)
public class TSRGMapper 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 lines.get(0).startsWith("tsrg2 left right");
}
- /**
- * 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++) { //start from 1 to skip header
String currentLine = lines.get(i);
@@ -55,4 +43,9 @@ public class TSRGMapper extends AbstractMapper {
}
}
}
+
+ @Override
+ protected AbstractMapper newInstance() {
+ return new TSRGMapper();
+ }
}