From 3f4343c9965604f996e89bab431317d6f3b7e569 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Thu, 15 Dec 2022 11:43:24 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=86=99=20toString=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/xyz/zhouxy/plusone/util/Enumeration.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/xyz/zhouxy/plusone/util/Enumeration.java b/src/main/java/xyz/zhouxy/plusone/util/Enumeration.java index 632f548..28927d1 100644 --- a/src/main/java/xyz/zhouxy/plusone/util/Enumeration.java +++ b/src/main/java/xyz/zhouxy/plusone/util/Enumeration.java @@ -35,4 +35,11 @@ public abstract class Enumeration> { Enumeration other = (Enumeration) obj; return value == other.value; } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("[").append(value).append(": ").append(name).append("]"); + return builder.toString(); + } }