All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.skjolberg.packing.BoxItem Maven / Gradle / Ivy

There is a newer version: 1.2.5
Show newest version
package com.github.skjolberg.packing;

/**
 * A {@linkplain Box} repeated one or more times. Typically corresponding to an order-line, but
 * can also represent multiple products which share the same size. 
 * 
 */
public class BoxItem {

	private final int count;
	private final Box box;

	public BoxItem(Box box) {
		this(box, 1);
	}

	public BoxItem(Box box, int count) {
		super();
		this.box = box;
		this.count = count;
	}

	public int getCount() {
		return count;
	}

	public Box getBox() {
		return box;
	}

  @Override
  public String toString() {
    return String.format("%dx%s", count, box);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy