/src/main/java/nl/bitbrains/nebu/common/topology/PhysicalResourceBuilder.java
https://github.com/deltaforge/nebu-common-java · Java · 47 lines · 20 code · 7 blank · 20 comment · 0 complexity · 736e3efc310da3fcdfc9eb17ea2bf884 MD5 · raw file
- package nl.bitbrains.nebu.common.topology;
- import nl.bitbrains.nebu.common.interfaces.IBuilder;
- import nl.bitbrains.nebu.common.util.ErrorChecker;
- /**
- * Builder for the PhysicalResources.
- *
- * @param <T>
- * Type to build.
- * @author Jesse Donkervliet, Tim Hegeman, and Stefan Hugtenburg
- */
- public abstract class PhysicalResourceBuilder<T> implements IBuilder<T> {
- private String uuid;
- /**
- * Simple default (empty) constructor.
- */
- public PhysicalResourceBuilder() {
- }
- @Override
- public void reset() {
- this.uuid = null;
- }
- /**
- * @param uuid
- * to set.
- * @return this for fluency.
- */
- public PhysicalResourceBuilder<T> withUuid(final String uuid) {
- ErrorChecker.throwIfNullArgument(uuid, PhysicalResource.UUID_NAME);
- this.uuid = uuid;
- return this;
- }
- /**
- * Simple getter.
- *
- * @return the uuid.
- */
- protected String getUUID() {
- return this.uuid;
- }
- }