Skip to content

Commit

Permalink
Change MenuImpl name to DefaultMenu and refactors.
Browse files Browse the repository at this point in the history
  • Loading branch information
kafeindev committed Nov 16, 2023
1 parent 4fc0273 commit ee2d1ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@

import java.util.Set;

final class MenuImpl extends AbstractMenu {
public MenuImpl(MenuProperties properties, InventoryComponent.Factory inventoryFactory, ItemComponent.Factory itemFactory) {
final class DefaultMenu extends AbstractMenu {
public DefaultMenu(MenuProperties properties, InventoryComponent.Factory inventoryFactory, ItemComponent.Factory itemFactory) {
super(properties, inventoryFactory, itemFactory);
}

public MenuImpl(MenuProperties properties, InventoryComponent.Factory inventoryFactory, ItemComponent.Factory itemFactory, Set<Button> buttons) {
public DefaultMenu(MenuProperties properties, InventoryComponent.Factory inventoryFactory, ItemComponent.Factory itemFactory, Set<Button> buttons) {
super(properties, inventoryFactory, itemFactory, buttons);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,9 @@ public Menu build() {
MenuProperties properties = this.propertiesBuilder.build();
checkNotNull(properties.getName(), "name");
checkNotNull(properties.getTitle(), "title");
checkArgument(properties.getSize() > 0, "size must be greater than 0");
checkNotNull(this.inventoryFactory, "inventoryFactory");
checkNotNull(this.itemFactory, "itemFactory");

return new MenuImpl(properties, this.inventoryFactory, this.itemFactory, this.buttons);
return new DefaultMenu(properties, this.inventoryFactory, this.itemFactory, this.buttons);
}
}

0 comments on commit ee2d1ef

Please sign in to comment.