mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8321545: Override toString() for Format subclasses
Reviewed-by: naoto, rriggs
This commit is contained in:
parent
edfee7f348
commit
96607df7f0
12 changed files with 419 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -2391,6 +2391,17 @@ public final class CompactNumberFormat extends NumberFormat {
|
|||
+ Boolean.hashCode(parseBigDecimal);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@return a string identifying this {@code CompactNumberFormat}, for debugging}
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return
|
||||
"""
|
||||
CompactNumberFormat [locale: "%s", decimal pattern: "%s", compact patterns: "%s"]
|
||||
""".formatted(symbols.getLocale().getDisplayName(), decimalPattern, Arrays.toString(compactPatterns));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns a copy of this {@code CompactNumberFormat}
|
||||
* instance.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue