public class PhonePrefixMap
extends java.lang.Object
implements java.io.Externalizable
| Constructor and Description |
|---|
PhonePrefixMap()
Creates an empty
PhonePrefixMap. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
lookup(Phonenumber.PhoneNumber number)
As per
lookup(long), but receives the number as a PhoneNumber instead of a long. |
void |
readExternal(java.io.ObjectInput objectInput)
Supports Java Serialization.
|
void |
readPhonePrefixMap(java.util.SortedMap<java.lang.Integer,java.lang.String> sortedPhonePrefixMap)
Creates an
PhonePrefixMap initialized with sortedPhonePrefixMap. |
java.lang.String |
toString()
Dumps the mappings contained in the phone prefix map.
|
void |
writeExternal(java.io.ObjectOutput objectOutput)
Supports Java Serialization.
|
public PhonePrefixMap()
PhonePrefixMap. The default constructor is necessary for implementing
Externalizable. The empty map could later be populated by
readPhonePrefixMap(java.util.SortedMap) or readExternal(java.io.ObjectInput).public void readPhonePrefixMap(java.util.SortedMap<java.lang.Integer,java.lang.String> sortedPhonePrefixMap)
PhonePrefixMap initialized with sortedPhonePrefixMap. Note that the
underlying implementation of this method is expensive thus should not be called by
time-critical applications.sortedPhonePrefixMap - a map from phone number prefixes to descriptions of those prefixes
sorted in ascending order of the phone number prefixes as integers.public void readExternal(java.io.ObjectInput objectInput)
throws java.io.IOException
readExternal in interface java.io.Externalizablejava.io.IOExceptionpublic void writeExternal(java.io.ObjectOutput objectOutput)
throws java.io.IOException
writeExternal in interface java.io.Externalizablejava.io.IOExceptionpublic java.lang.String lookup(Phonenumber.PhoneNumber number)
lookup(long), but receives the number as a PhoneNumber instead of a long.number - the phone number to look uppublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2019 Google. All Rights Reserved.