{"size": 698, "ext": "js", "max_stars_repo_path": "src/lib/constrained-item.js", "max_stars_repo_name": "stampr/boxpacker", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/lib/constrained-item.js", "max_issues_repo_name": "stampr/boxpacker", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/lib/constrained-item.js", "max_forks_repo_name": "stampr/boxpacker", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.9285714286, "max_line_length": 121, "alphanum_fraction": 0.6876790831}
import { Item } from './item.js';
import { mustInherit } from './oop.js';

/**
 * An item to be packed where additional constraints need to be considered. Only implement this interface if you actually
 * need this additional functionality as it will slow down the packing algorithm
 * @author Doug Wright
 * @package BoxPacker
 */
export class ConstrainedItem extends Item {
  constructor() {
    super();
  }

  /**
   * Hook for user implementation of item-specific constraints, e.g. max <x> batteries per box
   *
   * @param ItemList $alreadyPackedItems
   * @param Box      $box
   *
   * @return bool
   */
  canBePackedInBox(ItemList_alreadyPackedItems, Box_box) {
    mustInherit();
  }

}
