diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/SelectFormat.java b/icu4j/main/classes/core/src/com/ibm/icu/text/SelectFormat.java
index d3dbfef1078..dd9669d5216 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/SelectFormat.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/SelectFormat.java
@@ -1,8 +1,8 @@
/*
*******************************************************************************
- * Copyright (c) 2004-2010, International Business Machines
- * Corporation and others. All Rights Reserved.
- * Copyright (C) 2009 , Yahoo! Inc.
+ * Copyright (C) 2004-2010, International Business Machines Corporation and *
+ * others. All Rights Reserved. *
+ * Copyright (C) 2009 , Yahoo! Inc. *
*******************************************************************************
*/
package com.ibm.icu.text;
@@ -10,6 +10,8 @@ package com.ibm.icu.text;
import java.text.Format;
import java.text.FieldPosition;
import java.text.ParsePosition;
+import java.io.ObjectInputStream;
+import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
@@ -167,7 +169,7 @@ public class SelectFormat extends Format{
* String
(select case keyword) --> String
* (message for this select case).
*/
- private Map parsedValues = null;
+ transient private Map parsedValues = null;
/**
* Common name for the default select form. This name is returned
@@ -175,12 +177,12 @@ public class SelectFormat extends Format{
* can additionally be assigned rules of its own.
* @draft ICU 4.4
*/
- public static final String KEYWORD_OTHER = "other";
+ private static final String KEYWORD_OTHER = "other";
/*
* The types of character classifications
*/
- public enum CharacterClass {
+ private enum CharacterClass {
T_START_KEYWORD, T_CONTINUE_KEYWORD, T_LEFT_BRACE,
T_RIGHT_BRACE, T_SPACE, T_OTHER
};
@@ -189,7 +191,7 @@ public class SelectFormat extends Format{
* The different states needed in state machine
* in applyPattern method.
*/
- public enum State {
+ private enum State {
START_STATE, KEYWORD_STATE,
PAST_KEYWORD_STATE, PHRASE_STATE
};
@@ -504,14 +506,6 @@ public class SelectFormat extends Format{
throw new IllegalArgumentException(errorText);
}
- /**
- * {@inheritDoc}
- * @draft ICU 4.4
- */
- public boolean equals(Object rhs) {
- return rhs instanceof SelectFormat && this.equals((SelectFormat) rhs);
- }
-
/**
* Returns true if this equals the provided SelectFormat.
* @param rhs the SelectFormat to compare against
@@ -533,8 +527,8 @@ public class SelectFormat extends Format{
* @draft ICU 4.4
*/
public int hashCode() {
- if( parsedValues!=null){
- return parsedValues.hashCode();
+ if( pattern!=null){
+ return pattern.hashCode();
}
return 0;
}
@@ -551,4 +545,13 @@ public class SelectFormat extends Format{
buf.append("pattern='" + pattern + "'");
return buf.toString();
}
+
+ private void readObject(ObjectInputStream in)
+ throws IOException, ClassNotFoundException {
+/* To Do
+ if ( pattern != null ){
+ applyPattern(pattern);
+ }
+*/
+ }
}