+ return (weight >= getMin() && weight <= getMax());
+ }
+
+ public Integer[] getValuesArray() {
+ int arrayLength = this.getMax() - this.getMin() + 1;
+ Integer[] intArray = new Integer[arrayLength];
+ for (int i = 0; i < intArray.length; i++) {
+ intArray[i] = this.getMin() + i;
+ }
+ return intArray;
+ }
+
+ public int distanceTo(Weight weight) {
+ int distance = weight.getWeight() - this.getWeight();
+ return Math.abs(distance);