重写 toString 方法。

feature/net-util
ZhouXY108 2023-06-05 14:42:05 +08:00
parent 45a0407a1d
commit 7e467afc4d
2 changed files with 10 additions and 0 deletions

View File

@ -78,4 +78,9 @@ public class DbRecord extends AbstractMapWrapper<String, Object, DbRecord> {
protected DbRecord getSelf() {
return this;
}
@Override
public String toString() {
return "xyz.zhouxy.plusone.commons.jdbc.DbRecord@" + super.toString();
}
}

View File

@ -144,6 +144,11 @@ public abstract class AbstractMapWrapper<K, V, T extends AbstractMapWrapper<K, V
protected abstract T getSelf();
@Override
public String toString() {
return this.map.toString();
}
protected abstract static class Builder<K, V> {
protected final Map<K, V> map;
protected Consumer<K> keyChecker;