修改 toString 方法。

feature/net-util
ZhouXY108 2023-03-13 16:33:38 +08:00
parent 0b80cf34ba
commit 61bd352fd7
1 changed files with 1 additions and 3 deletions

View File

@ -59,9 +59,7 @@ public abstract class Enumeration<T extends Enumeration<T>> {
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("[").append(value).append(": ").append(name).append("]");
return builder.toString();
return "[" + value + ": " + name + "]";
}
protected static final class EnumerationValuesHolder<T extends Enumeration<T>> {