Code example for Splitter

Methods: split

0
    public static NServer parse(final CIString value) {
        return parse(value.toString());
    } 
 
    public static NServer parse(final String value) {
        final Iterator<String> iterator = SPLITTER.split(value).iterator();
        if (!iterator.hasNext()) {
            throw new AttributeParseException("No hostname specified", value);
        } 
 
        String hostname = iterator.next();
        if (hostname.endsWith(".")) {
            hostname = hostname.substring(0, hostname.length() - 1);
        } 
 
        if (!HOSTNAME_PATTERN.matcher(hostname).matches()) {
            throw new AttributeParseException("Hostname does not match", value);
        } 
 
        final IpInterval ipInterval;
Experience pair programming with AI  Get Codota for Java