Package io.spine.net
Class InternetDomains
- java.lang.Object
-
- io.spine.net.InternetDomains
-
public final class InternetDomains extends Object
Utility class for working withInternetDomain
s.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isValid(String name)
Verifies if the passed sequence is a valid internet domain name.static Pattern
pattern()
ObtainsPattern
for checking an Internet host name.static String
toString(InternetDomain domain)
Obtains string representation of the passed internet domain.static InternetDomain
valueOf(String name)
Creates a newInternetDomain
instance for the passed name.
-
-
-
Method Detail
-
pattern
public static Pattern pattern()
ObtainsPattern
for checking an Internet host name.The pattern does not accept IP addresses.
-
isValid
public static boolean isValid(String name)
Verifies if the passed sequence is a valid internet domain name.
-
toString
public static String toString(InternetDomain domain)
Obtains string representation of the passed internet domain.
-
valueOf
public static InternetDomain valueOf(String name)
Creates a newInternetDomain
instance for the passed name.- Parameters:
name
- a valid Internet domain name- Returns:
- new
InternetDomain
instance - Throws:
IllegalArgumentException
- if the passed domain name is not valid
-
-