mirror of
https://bitbucket.org/projectswg/pswgcommon.git
synced 2026-07-13 21:00:59 -04:00
Added CustomizationString toString()
This commit is contained in:
@@ -43,6 +43,7 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
/**
|
||||
@@ -118,6 +119,19 @@ public class CustomizationString implements Encodable, Persistable {
|
||||
variables.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder str = new StringBuilder();
|
||||
boolean first = true;
|
||||
for (Entry<String, CustomizationVariable> e : variables.entrySet()) {
|
||||
if (!first)
|
||||
str.append(", ");
|
||||
first = false;
|
||||
str.append(e.getKey()).append('=').append(e.getValue().getValue());
|
||||
}
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decode(NetBuffer data) {
|
||||
byte[] stringData = data.getArray();
|
||||
|
||||
Reference in New Issue
Block a user