io.vertx.pgclient.data.Inet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vertx-pg-client Show documentation
Show all versions of vertx-pg-client Show documentation
The Reactive PostgreSQL Client
package io.vertx.pgclient.data;
import java.net.InetAddress;
/**
* A PosgreSQL inet network address.
*/
public class Inet {
private InetAddress address;
private Integer netmask;
/**
* @return the inet address
*/
public InetAddress getAddress() {
return address;
}
/**
* Set the inet address
* @param address
* @return a reference to this, so the API can be used fluently
*/
public Inet setAddress(InetAddress address) {
this.address = address;
return this;
}
/**
* @return the optional netmask
*/
public Integer getNetmask() {
return netmask;
}
/**
* Set a netmask.
*
* @param netmask the netmask
* @return a reference to this, so the API can be used fluently
*/
public Inet setNetmask(Integer netmask) {
if (netmask != null && (netmask < 0 || netmask > 255)) {
throw new IllegalArgumentException("Invalid netmask: " + netmask);
}
this.netmask = netmask;
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy