br.com.objectos.rio.dhcp.ConfiguredAdapterBuilder Maven / Gradle / Ivy
package br.com.objectos.rio.dhcp;
import br.com.objectos.rio.net.HardwareAddress;
import br.com.objectos.rio.net.IpAddress;
import br.com.objectos.rio.net.NetInteger;
import javax.annotation.Generated;
@Generated("br.com.objectos.way.pojo.BuilderPlugin")
final class ConfiguredAdapterBuilder {
private HardwareAddress hardwareAddress;
public ConfiguredAdapterBuilderDsl hardwareAddress(HardwareAddress hardwareAddress) {
if (hardwareAddress == null) {
throw new NullPointerException();
}
this.hardwareAddress = hardwareAddress;
return new Dsl();
}
private class Dsl implements ConfiguredAdapterBuilderDsl, ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslDomainNameServer, ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslIpAddress, ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslLeaseTime, ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslSubnetMask, ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslRouter, ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslServerId {
private IpAddress.Array domainNameServer;
private IpAddress ipAddress;
private NetInteger leaseTime;
private IpAddress subnetMask;
private IpAddress.Array router;
private IpAddress serverId;
@Override
public ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslDomainNameServer domainNameServer(IpAddress.Array domainNameServer) {
if (domainNameServer == null) {
throw new NullPointerException();
}
this.domainNameServer = domainNameServer;
return this;
}
@Override
public ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslIpAddress ipAddress(IpAddress ipAddress) {
if (ipAddress == null) {
throw new NullPointerException();
}
this.ipAddress = ipAddress;
return this;
}
@Override
public ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslLeaseTime leaseTime(NetInteger leaseTime) {
if (leaseTime == null) {
throw new NullPointerException();
}
this.leaseTime = leaseTime;
return this;
}
@Override
public ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslSubnetMask subnetMask(IpAddress subnetMask) {
if (subnetMask == null) {
throw new NullPointerException();
}
this.subnetMask = subnetMask;
return this;
}
@Override
public ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslRouter router(IpAddress.Array router) {
if (router == null) {
throw new NullPointerException();
}
this.router = router;
return this;
}
@Override
public ConfiguredAdapterBuilderDsl.ConfiguredAdapterBuilderDslServerId serverId(IpAddress serverId) {
if (serverId == null) {
throw new NullPointerException();
}
this.serverId = serverId;
return this;
}
@Override
public ConfiguredAdapter build() {
return new TestingConfiguredAdapter(hardwareAddress, domainNameServer, ipAddress, leaseTime, subnetMask, router, serverId);
}
}
}