All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.bazhenov.docker.PortRef Maven / Gradle / Ivy

There is a newer version: 1.6.2
Show newest version
package me.bazhenov.docker;

import static java.util.Objects.requireNonNull;

final class PortRef {

	private ContainerDefinition containerDefinition;
	private int port;

	PortRef(ContainerDefinition containerDefinition, int port) {
		this.containerDefinition = requireNonNull(containerDefinition);
		if (port <= 0)
			throw new IllegalArgumentException("Port should be positive");
		this.port = port;
	}

	ContainerDefinition getContainerDefinition() {
		return containerDefinition;
	}

	int getContainerPort() {
		return port;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy