1 public class Size
implements Comparable
<Size
> {
10 public int getSize() {
14 public void setSize(int size
) {
15 if (validateSize(size
)) {
18 throw new IllegalArgumentException("Size must be between" + this.min
+ " and " + this.max
);
22 private boolean validateSize(int size
) {
23 return (size
> max
|| size
< min
);
27 public int compareTo(Size size
) {
28 int distance
= size
.size
- this.getSize();