From f0bf19f11d6787a7f17b4c10e6b76e7003c57e57 Mon Sep 17 00:00:00 2001 From: Aleksey Kalenchukov Date: Sun, 28 Aug 2022 18:16:33 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=20NumeralSystem#toStrin?= =?UTF-8?q?g()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../numeralsystem/resources/NumeralSystem.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/dev/kalenchukov/numeralsystem/resources/NumeralSystem.java b/src/main/java/dev/kalenchukov/numeralsystem/resources/NumeralSystem.java index 9c83583..d3f06f5 100644 --- a/src/main/java/dev/kalenchukov/numeralsystem/resources/NumeralSystem.java +++ b/src/main/java/dev/kalenchukov/numeralsystem/resources/NumeralSystem.java @@ -88,4 +88,16 @@ public Numerable getNumeralSystem() { return this.numeralSystem; } + + /** + * Возвращает название константы. + * + * @return Название константы. + */ + @NotNull + @Override + public String toString() + { + return this.name().replace('_', ' '); + } } \ No newline at end of file