Skip to content

Commit

Permalink
remove unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sv99 committed Jul 23, 2023
1 parent cb3e1f0 commit c183d03
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ public static String unescape(String value) {
public String getValue() {
if (value.equals("null"))
return null;
String res = YamlStringEscapeUtils.unescapeString(value);
String res = unescape(value);
// remove quotation marks
res = res.replaceAll("^\"|\"$", "");
res = res.replaceAll("^'|'$", "");
return res;
}

public String getKey() {
String res = YamlStringEscapeUtils.unescapeString(key);
String res = unescape(key);
// remove quotation marks
res = res.replaceAll("^\"|\"$", "");
res = res.replaceAll("^'|'$", "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ public YamlReader(InputStream in) {
read(in);
}

public int getLineNo() {
return mCurrent + 1;
}

public void pushLine() {
if (mCurrent > 0)
mCurrent--;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ public void close() throws IOException {
mWriter.close();
}

public int getIndent() {
return mIndent;
}

public String getIndentString() {
// for java 11
// return " ".repeat(mIndent);
Expand All @@ -48,11 +44,6 @@ public void writeIndent() {
mWriter.print(getIndentString());
}

public void writeInt(String key, int value) {
writeIndent();
mWriter.println(escape(key) + ": " + value);
}

public void writeBool(String key, boolean value) {
writeIndent();
String val = value ? "true": "false";
Expand Down Expand Up @@ -85,19 +76,6 @@ public <T> void writeList(String key, List<T> list) {
}
}

public <K, V> void writeCommonMap(String key, Map<K, V> map) {
if (Objects.isNull(map))
return;
writeIndent();
mWriter.println(escape(key) + ":");
nextIndent();
for (K mapKey: map.keySet()) {
writeIndent();
mWriter.println(mapKey + ": " + map.get(mapKey));
}
prevIndent();
}

public void writeStringMap(String key, Map<String, String> map) {
if (Objects.isNull(map))
return;
Expand Down

0 comments on commit c183d03

Please sign in to comment.