Class InventoryItemAmountMatcher
java.lang.Object
org.hamcrest.BaseMatcher<InventoryMock>
org.hamcrest.TypeSafeMatcher<InventoryMock>
org.mockbukkit.mockbukkit.matcher.inventory.InventoryItemAmountMatcher
- All Implemented Interfaces:
org.hamcrest.Matcher<InventoryMock>,org.hamcrest.SelfDescribing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull InventoryItemAmountMatchercontainsAtLeast(@NotNull ItemStack targetItem, int amount) static @NotNull InventoryItemAmountMatchercontainsAtLeast(Material material, int amount) static @NotNull org.hamcrest.Matcher<InventoryMock> containsLessThan(@NotNull ItemStack targetItem, int amount) static @NotNull org.hamcrest.Matcher<InventoryMock> containsLessThan(Material material, int amount) voiddescribeMismatchSafely(InventoryMock inventoryMock, org.hamcrest.Description description) voiddescribeTo(org.hamcrest.Description description) protected booleanmatchesSafely(InventoryMock inventoryMock) Methods inherited from class org.hamcrest.TypeSafeMatcher
describeMismatch, matchesMethods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, isNotNull, toString
-
Constructor Details
-
InventoryItemAmountMatcher
-
-
Method Details
-
matchesSafely
- Specified by:
matchesSafelyin classorg.hamcrest.TypeSafeMatcher<InventoryMock>
-
describeTo
public void describeTo(org.hamcrest.Description description) -
describeMismatchSafely
public void describeMismatchSafely(InventoryMock inventoryMock, org.hamcrest.Description description) - Overrides:
describeMismatchSafelyin classorg.hamcrest.TypeSafeMatcher<InventoryMock>
-
containsAtLeast
@NotNull public static @NotNull InventoryItemAmountMatcher containsAtLeast(Material material, int amount) - Parameters:
material- The material of the itemsamount- The amount of the items required for a match- Returns:
- A matcher which matches with any inventory with more than the required amount of items
-
containsLessThan
@NotNull public static @NotNull org.hamcrest.Matcher<InventoryMock> containsLessThan(Material material, int amount) - Parameters:
material- The material of the itemsamount- The amount of the items required for no match- Returns:
- A matcher which matches with any inventory with more than the required amount of items
-
containsAtLeast
@NotNull public static @NotNull InventoryItemAmountMatcher containsAtLeast(@NotNull @NotNull ItemStack targetItem, int amount) - Parameters:
targetItem- The target itemamount- The amount of the items required for a match- Returns:
- A matcher which matches with any inventory with more than the required amount of items
-
containsLessThan
@NotNull public static @NotNull org.hamcrest.Matcher<InventoryMock> containsLessThan(@NotNull @NotNull ItemStack targetItem, int amount) - Parameters:
targetItem- The target itemamount- The amount of the items required for no match- Returns:
- A matcher which matches with any inventory with lower than the given amount of items
-