public class AreaCodeMap extends Object implements Externalizable
| Constructor and Description |
|---|
AreaCodeMap()
Creates an empty
AreaCodeMap. |
| Modifier and Type | Method and Description |
|---|---|
void |
readAreaCodeMap(SortedMap<Integer,String> sortedAreaCodeMap)
Creates an
AreaCodeMap initialized with sortedAreaCodeMap. |
void |
readExternal(ObjectInput objectInput)
Supports Java Serialization.
|
String |
toString()
Dumps the mappings contained in the area code map.
|
void |
writeExternal(ObjectOutput objectOutput)
Supports Java Serialization.
|
public AreaCodeMap()
AreaCodeMap. The default constructor is necessary for implementing
Externalizable. The empty map could later be populated by
readAreaCodeMap(java.util.SortedMap) or readExternal(java.io.ObjectInput).public void readAreaCodeMap(SortedMap<Integer,String> sortedAreaCodeMap)
AreaCodeMap initialized with sortedAreaCodeMap. Note that the
underlying implementation of this method is expensive thus should not be called by
time-critical applications.sortedAreaCodeMap - a map from phone number prefixes to descriptions of corresponding
geographical areas, sorted in ascending order of the phone number prefixes as integers.public void readExternal(ObjectInput objectInput) throws IOException
readExternal in interface ExternalizableIOExceptionpublic void writeExternal(ObjectOutput objectOutput) throws IOException
writeExternal in interface ExternalizableIOExceptionCopyright © 2013 Google. All Rights Reserved.