Annotation cleanup

This commit is contained in:
TheMode 2021-04-12 01:07:05 +02:00
parent bba9c70586
commit aac32420de
2 changed files with 4 additions and 3 deletions

View File

@ -13,7 +13,7 @@ public interface TransactionOption<T> {
* <p> * <p>
* The remaining, can be air. * The remaining, can be air.
*/ */
TransactionOption<@NotNull ItemStack> ALL = (inventory, result, itemChangesMap) -> { TransactionOption<ItemStack> ALL = (inventory, result, itemChangesMap) -> {
itemChangesMap.forEach(inventory::safeItemInsert); itemChangesMap.forEach(inventory::safeItemInsert);
return result; return result;
}; };
@ -23,7 +23,7 @@ public interface TransactionOption<T> {
* <p> * <p>
* Returns true if the item has been added, false if nothing changed. * Returns true if the item has been added, false if nothing changed.
*/ */
TransactionOption<@NotNull Boolean> ALL_OR_NOTHING = (inventory, result, itemChangesMap) -> { TransactionOption<Boolean> ALL_OR_NOTHING = (inventory, result, itemChangesMap) -> {
if (result.isAir()) { if (result.isAir()) {
// Item can be fully placed inside the inventory, do so // Item can be fully placed inside the inventory, do so
itemChangesMap.forEach(inventory::safeItemInsert); itemChangesMap.forEach(inventory::safeItemInsert);
@ -39,7 +39,7 @@ public interface TransactionOption<T> {
* <p> * <p>
* Returns true if the item can be fully added, false otherwise. * Returns true if the item can be fully added, false otherwise.
*/ */
TransactionOption<@NotNull Boolean> DRY_RUN = (inventory, result, itemChangesMap) -> result.isAir(); TransactionOption<Boolean> DRY_RUN = (inventory, result, itemChangesMap) -> result.isAir();
@NotNull T fill(@NotNull AbstractInventory inventory, @NotNull T fill(@NotNull AbstractInventory inventory,
@NotNull ItemStack result, @NotNull ItemStack result,

View File

@ -12,6 +12,7 @@ import java.util.Map;
/** /**
* Represents a type of transaction that you can apply to an {@link AbstractInventory}. * Represents a type of transaction that you can apply to an {@link AbstractInventory}.
*/ */
@FunctionalInterface
public interface TransactionType { public interface TransactionType {
/** /**