public Host(DomainName _domainName) { super(); this._domainName = _domainName; this._ipAddress = null; this._value = _domainName.getValue().toString().toCharArray(); }
public static DomainName getDefaultInstance(String defaultValue) { return new DomainName(defaultValue); }
@ConstructorProperties("value") public DomainName(java.lang.String _value) { if (_value != null) { check_valueLength(_value); } Preconditions.checkNotNull(_value, "Supplied value may not be null"); for (Pattern p : patterns) { Preconditions.checkArgument(p.matcher(_value).matches(), "Supplied value \"%s\" does not match required pattern \"%s\"", _value, p); } this._value = _value; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((_ipAddress == null) ? 0 : _ipAddress.hashCode()); result = prime * result + ((_domainName == null) ? 0 : _domainName.hashCode()); result = prime * result + ((_value == null) ? 0 : Arrays.hashCode(_value)); return result; }
return false; } else if(!_domainName.equals(other._domainName)) { return false;
/** * Return a String representing the value of this union. * * @return String representation of this union's value. */ public String stringValue() { if (_ipAddress != null) { return _ipAddress.stringValue(); } if (_domainName != null) { return _domainName.getValue().toString(); } throw new IllegalStateException("No value assinged"); }
public static DomainName getDefaultInstance(String defaultValue) { return new DomainName(defaultValue); }
@ConstructorProperties("value") public DomainName(java.lang.String _value) { if (_value != null) { check_valueLength(_value); } Preconditions.checkNotNull(_value, "Supplied value may not be null"); for (Pattern p : patterns) { Preconditions.checkArgument(p.matcher(_value).matches(), "Supplied value \"%s\" does not match required pattern \"%s\"", _value, p); } this._value = _value; }
public char[] getValue() { if (_value == null) { if (_ipAddress != null) { _value = _ipAddress.getValue(); } else if (_domainName != null) { _value = _domainName.getValue().toString().toCharArray(); } } return _value == null ? null : _value.clone(); }
public static DomainName getDefaultInstance(String defaultValue) { return new DomainName(defaultValue); }
@ConstructorProperties("value") public DomainName(String _value) { if (_value != null) { check_valueLength(_value); } Objects.requireNonNull(_value, "Supplied value may not be null"); CodeHelpers.checkPattern(_value, patterns, regexes); this._value = _value; }
private InetSocketAddress getSocketAddress(final Host host, int port) { if(host.getDomainName() != null) { return new InetSocketAddress(host.getDomainName().getValue(), port); } else { final IpAddress ipAddress = host.getIpAddress(); final String ip = ipAddress.getIpv4Address() != null ? ipAddress.getIpv4Address().getValue() : ipAddress.getIpv6Address().getValue(); return new InetSocketAddress(ip, port); } }
DomainName domainName = new DomainName(defaultValue); return new Host(domainName);
private void transformIdentityToRequest( final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ipsec.rev181214.identity.grouping.Identity identityData, final Ikev2ProfileSetId request) { if (identityData instanceof Ipv4Address) { request.idType = 1; request.data = ipv4AddressNoZoneToArray(((Ipv4Address) identityData).getIpv4Address().getValue()); } else if (identityData instanceof FqdnString) { request.idType = 2; request.data = ((FqdnString) identityData).getFqdnString().getValue().getBytes(); } else if (identityData instanceof Rfc822AddressString) { request.idType = 3; request.data = ((Rfc822AddressString) identityData).getRfc822AddressString().getBytes(); } else if (identityData instanceof Ipv6Address) { request.idType = 5; request.data = ipv6AddressNoZoneToArray(((Ipv6Address) identityData).getIpv6Address()); } request.dataLen = request.data.length; }
DomainName domainName = new DomainName(defaultValue); return new Host(domainName);
inab.setName(new DomainName(na.getDynamicHostname()));