// Path: op1/src/main/java/com/op1/util/Check.java
// public class Check {
// 
//     public static <T> T notNull(T t, String message) {
//         if (t == null) {
//             throw new IllegalArgumentException(message);
//         }
//         return t;
//     }
// 
//     public static void that(boolean b, String message) {
//         if (!b) {
//             throw new IllegalArgumentException(message);
//         }
//     }
// 
//     public static void state(boolean b, String message) {
//         if (!b) {
//             throw new IllegalStateException(message);
//         }
//     }
// }


import com.op1.util.Check;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
package com.op1.pack;



/**
 * A Bin represents a container with a capacity. You can fill the bin with Items. You can also check whether there is
 * space for an item before putting it in. A Bin can contain more items than its capacity. When this is the case, the
 * isOverflowing() method returns true.
 *
 * This class is not thread safe.
 */
public class Bin {

    private final double capacity;
    private List<Item> items = new ArrayList<Item>();

    public Bin(double capacity) {
// Path: op1/src/main/java/com/op1/util/Check.java
// public class Check {
// 
//     public static <T> T notNull(T t, String message) {
//         if (t == null) {
//             throw new IllegalArgumentException(message);
//         }
//         return t;
//     }
// 
//     public static void that(boolean b, String message) {
//         if (!b) {
//             throw new IllegalArgumentException(message);
//         }
//     }
// 
//     public static void state(boolean b, String message) {
//         if (!b) {
//             throw new IllegalStateException(message);
//         }
//     }
// }


// Path: op1/src/main/java/com/op1/pack/Bin.java
import com.op1.util.Check;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

package com.op1.pack;



/**
 * A Bin represents a container with a capacity. You can fill the bin with Items. You can also check whether there is
 * space for an item before putting it in. A Bin can contain more items than its capacity. When this is the case, the
 * isOverflowing() method returns true.
 *
 * This class is not thread safe.
 */
public class Bin {

    private final double capacity;
    private List<Item> items = new ArrayList<Item>();

    public Bin(double capacity) {
        Check.that(capacity > 0, "Capacity must be non-zero and positive");