Package com.sinch.sdk.models
Class E164PhoneNumber
- java.lang.Object
-
- com.sinch.sdk.models.E164PhoneNumber
-
public class E164PhoneNumber extends Object
E164 Phone Number representation class helper
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()static voidsetStrict(boolean strict)Configure if invalid string values will throw an Exception or notStringstringValue()Get current value as a StringStringtoString()static booleanvalidate(String value)Validate value against E164 representation pattern,static E164PhoneNumbervalueOf(String value)Create a new instance
-
-
-
Method Detail
-
valueOf
public static E164PhoneNumber valueOf(String value)
Create a new instance- Parameters:
value- Phone number value- Returns:
- The newly created E164 instance
-
validate
public static boolean validate(String value)
Validate value against E164 representation pattern,- Parameters:
value- String value representation to be checked- Returns:
- TRUE/FALSE
-
setStrict
public static void setStrict(boolean strict)
Configure if invalid string values will throw an Exception or not- Parameters:
strict- Set strict mode to true/false
-
stringValue
public String stringValue()
Get current value as a String- Returns:
- The value
-
-