public static class PhoneNumberUtil.PhoneHtmlGenerator
extends java.lang.Object
Constructor and Description |
---|
PhoneHtmlGenerator(java.lang.String number)
Create a new generator for the specified number
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
html()
Retrieve the HTML result using current Builder values.
|
PhoneNumberUtil.PhoneHtmlGenerator |
withCss(java.lang.String css)
CSS class or classes to use in the generated HTML link.
|
PhoneNumberUtil.PhoneHtmlGenerator |
withLanguage(java.lang.String lang)
Language in which I18Ned message should be printed.
|
PhoneNumberUtil.PhoneHtmlGenerator |
withLinkContent(java.lang.String html)
HTML to use as the body content of the generated link.
|
PhoneNumberUtil.PhoneHtmlGenerator |
withLinkTitle(java.lang.String text)
Text to use as the title attribute value of the generated link (instead of the default behavior which is to use number being called).
|
PhoneNumberUtil.PhoneHtmlGenerator |
withRegion(java.lang.String region)
Region of the phone number.
|
public PhoneHtmlGenerator(java.lang.String number)
number
- the telephone number to parse and displaypublic PhoneNumberUtil.PhoneHtmlGenerator withRegion(java.lang.String region)
region
- the ISO 3166-1 two-letter region code that denotes the region that we are expecting
the number to be from. This is only used if the number being parsed is not written in international format.public PhoneNumberUtil.PhoneHtmlGenerator withCss(java.lang.String css)
css
- one or more css classes, ignore if null or emtpypublic PhoneNumberUtil.PhoneHtmlGenerator withLinkContent(java.lang.String html)
html
- some HTML (must be valid HTML for use in a <a> tag).public PhoneNumberUtil.PhoneHtmlGenerator withLinkTitle(java.lang.String text)
text
- some text (this text will be properly encoded for use in an HTML attribute value, don't do it yourself).public PhoneNumberUtil.PhoneHtmlGenerator withLanguage(java.lang.String lang)
lang
- an ISO-639 language codepublic java.lang.String html()
Copyright © 2001-2019 Jalios SA. All Rights Reserved.