diff --git a/src/main/java/de/rwu/easydrop/exception/InvalidCatalogueException.java b/src/main/java/de/rwu/easydrop/exception/InvalidCatalogueException.java new file mode 100644 index 0000000..69e582a --- /dev/null +++ b/src/main/java/de/rwu/easydrop/exception/InvalidCatalogueException.java @@ -0,0 +1,27 @@ +package de.rwu.easydrop.exception; + +/** + * Exception that signifies the data of a Product are invalid. + * + * @since 0.3.0 + */ +public class InvalidCatalogueException extends RuntimeException { + /** + * Throws an exception that signifies the data of a Product are invalid. + * + * @param message + */ + public InvalidCatalogueException(final String message) { + super(message); + } + + /** + * Throws an exception that signifies the data of a Product are invalid. + * + * @param message + * @param cause + */ + public InvalidCatalogueException(final String message, final Throwable cause) { + super(message, cause); + } +} diff --git a/src/main/java/de/rwu/easydrop/model/ProductPair.java b/src/main/java/de/rwu/easydrop/model/ProductPair.java new file mode 100644 index 0000000..70140c0 --- /dev/null +++ b/src/main/java/de/rwu/easydrop/model/ProductPair.java @@ -0,0 +1,31 @@ +package de.rwu.easydrop.model; + +import lombok.Data; + +/** + * Associates two related Products to one another. + * + * @since 0.3.0 + */ +@Data +public class ProductPair { + /** + * The first product. + */ + private final Product product1; + /** + * The second product. + */ + private final Product product2; + + /** + * Constructs a Product Pair. + * + * @param a First product + * @param b Second product + */ + public ProductPair(final Product a, final Product b) { + this.product1 = a; + this.product2 = b; + } +}