LEFT | RIGHT |
(no file at all) | |
1 // © 2017 and later: Unicode, Inc. and others. | 1 // © 2017 and later: Unicode, Inc. and others. |
2 // License & terms of use: http://www.unicode.org/copyright.html#License | 2 // License & terms of use: http://www.unicode.org/copyright.html#License |
3 package com.ibm.icu.impl.number; | 3 package com.ibm.icu.impl.number; |
4 | 4 |
5 import java.io.IOException; | 5 import java.io.IOException; |
6 import java.io.ObjectInputStream; | 6 import java.io.ObjectInputStream; |
7 import java.io.ObjectOutputStream; | 7 import java.io.ObjectOutputStream; |
8 import java.io.Serializable; | 8 import java.io.Serializable; |
9 | 9 |
10 /** | 10 /** |
11 * ICU 59 called the class DecimalFormatProperties as just Properties. We need t
o keep a thin implementation for the | 11 * ICU 59 called the class DecimalFormatProperties as just Properties. We need t
o keep a thin |
12 * purposes of serialization. | 12 * implementation for the purposes of serialization. |
13 */ | 13 */ |
14 public class Properties implements Serializable { | 14 public class Properties implements Serializable { |
15 | 15 |
16 /** Same as DecimalFormatProperties. */ | 16 /** Same as DecimalFormatProperties. */ |
17 private static final long serialVersionUID = 4095518955889349243L; | 17 private static final long serialVersionUID = 4095518955889349243L; |
18 | 18 |
19 private transient DecimalFormatProperties instance; | 19 private transient DecimalFormatProperties instance; |
20 | 20 |
21 public DecimalFormatProperties getInstance() { | 21 public DecimalFormatProperties getInstance() { |
22 return instance; | 22 return instance; |
23 } | 23 } |
24 | 24 |
25 private void readObject(ObjectInputStream ois) throws IOException, ClassNotF
oundException { | 25 private void readObject(ObjectInputStream ois) throws IOException, ClassNotF
oundException { |
26 if (instance == null) { | 26 if (instance == null) { |
27 instance = new DecimalFormatProperties(); | 27 instance = new DecimalFormatProperties(); |
28 } | 28 } |
29 instance.readObjectImpl(ois); | 29 instance.readObjectImpl(ois); |
30 } | 30 } |
31 | 31 |
32 private void writeObject(ObjectOutputStream oos) throws IOException { | 32 private void writeObject(ObjectOutputStream oos) throws IOException { |
33 if (instance == null) { | 33 if (instance == null) { |
34 instance = new DecimalFormatProperties(); | 34 instance = new DecimalFormatProperties(); |
35 } | 35 } |
36 instance.writeObjectImpl(oos); | 36 instance.writeObjectImpl(oos); |
37 } | 37 } |
38 } | 38 } |
LEFT | RIGHT |