dlibphonenumber library

Classes

AsYouTypeFormatter
A formatter which formats phone numbers as they are entered. (based on the java implementation).
BuilderInfo
Per-message type setup.
ClientContext
Client side context for RpcClients.
CodedBufferReader
Reader used for converting binary-encoded protobufs into GeneratedMessages.
CodedBufferWriter
Writer used for converting GeneratedMessages into binary representation.
Extension<T>
An object representing an extension field.
ExtensionRegistry
A collection of Extension objects, organized by the message type they extend.
FieldInfo<T>
An object representing a protobuf message field.
GeneratedMessage
The base class for all protobuf message types.
GeneratedService
The implementation of a Service API.
GrpcServiceName
Use to annotate generated gRPC classes with the ID of the corresponding service.
Int32
An immutable 32-bit signed integer, in the range -2^31, 2^31 - 1. Arithmetic operations may overflow in order to maintain this range.
Int64
An immutable 64-bit signed integer, in the range -2^63, 2^63 - 1. Arithmetic operations may overflow in order to maintain this range.
IntX
A fixed-precision integer.
Locale
Based on the supported Geocoding locale directory names found in the resources/geocoding directory.
MapFieldInfo<K, V>
A FieldInfo subclass for protobuf map fields.
NumberFormat
PackageName
The package name of a protobuf message.
PbFieldType
Defines constants and functions for dealing with fieldType bits.
PbList<E>
A ListBase implementation used for protobuf repeated fields.
PbMap<K, V>
A MapBase implementation used for protobuf map fields.
PhoneMetadata
If you add, remove, or rename fields, or change their semantics, check if you should change the excludable field sets or the behavior in MetadataFilter.
PhoneMetadataCollection
PhoneNumber
PhoneNumber_CountryCodeSource
The source from which the country_code is derived. This is not set in the general parsing method, but in the method that parses and keeps raw_input. New fields could be added upon request.
PhoneNumberDesc
If you add, remove, or rename fields, or change their semantics, check if you should change the excludable field sets or the behavior in MetadataFilter.
PhoneNumberMatch
The immutable match of a phone number within a piece of text. Matches may be found using PhoneNumberUtil.findNumbers.
PhoneNumberMatcher
A stateful class that finds and extracts telephone numbers from String text. Instances can be created using the PhoneNumberUtil.findNumbers factory methods in PhoneNumberUtil.
PhoneNumberMatcherImpl
PhoneNumberOfflineGeocoder
An offline geocoder which provides geographical information related to a phone number.
PhoneNumberToCarrierMapper
A phone prefix mapper which provides carrier information related to a phone number.
PhoneNumberToTimeZonesMapper
An offline mapper from phone numbers to time zones.
PhoneNumberUtil
Utility for international phone numbers. Functionality includes formatting, parsing and validation. (based on the java implementation).
ProtobufEnum
A base class for all proto enum types.
RpcClient
Client-side transport for making calls to a service.
ServerContext
Server side context.
ShortNumberInfo
Methods for getting information about short phone numbers, such as short codes and emergency numbers.
TagNumber
Annotation for marking accessors that belong together.
TypeRegistry
A TypeRegistry is used to resolve Any messages in the proto3 JSON conversion.
UnknownFieldSet
A set of unknown fields in a GeneratedMessage.
UnknownFieldSetField
An unknown field in a UnknownFieldSet.

Enums

ErrorType
Errors encountered when parsing phone numbers.
Leniency
Leniency when PhoneNumberUtil.findNumbers finding potential phone numbers in text segments. The levels here are ordered in increasing strictness.
MatchType
Types of phone number matches. See detailed description beside the isNumberMatch() method.
PhoneNumberFormat
international and national formats are consistent with the definition in ITU-T Recommendation E.123. However we follow local conventions such as using '-' instead of whitespace as separators. For example, the number of the Google Switzerland office will be written as '+41 44 668 1800' in international format, and as '044 668 1800' in national format. e164 format is as per international format but with no formatting applied, e.g. '+41446681800'. rfc3966 is as per international format, but with all spaces and other separating symbols replaced with a hyphen, and with any phone number extension appended with ';ext='. It also will have a prefix of 'tel:' added, e.g. 'tel:+41-44-668-1800'.
PhoneNumberType
Type of phone numbers.
ShortNumberCost
Cost categories of short numbers.
ValidationResult
Possible outcomes when testing if a PhoneNumber is possible.

Typedefs

CreateBuilderFunc = GeneratedMessage Function()
Type of an empty message builder.
MakeDefaultFunc = dynamic Function()
Type of a function that creates the default value of a protobuf field.
NumberGroupingChecker = bool Function(PhoneNumberUtil util, PhoneNumber number, StringBuffer normalizedCandidate, List<String> expectedNumberGroups)
Small helper interface such that the number groups can be checked according to different criteria, both for our default way of performing formatting and for any alternate formats we may want to check.
ValueOfFunc = ProtobufEnum? Function(int value)
Type of a function that makes an enum integer value to corresponding ProtobufEnum value.

Exceptions / Errors

IllegalArgumentException
InvalidProtocolBufferException
Exception thrown by the binary deserializer when the encoding is malformed.
NumberParseException
Generic exception class for errors encountered when parsing phone numbers.