Package org.bukkit.inventory

# Class RecipeChoice.MaterialChoice

java.lang.Object
org.bukkit.inventory.RecipeChoice.MaterialChoice

All Implemented Interfaces:
  `Cloneable`, `Predicate<ItemStack>`, `RecipeChoice`

Enclosing interface:
  RecipeChoice

public static class RecipeChoice.MaterialChoice extends Object implements RecipeChoice
Represents a choice of multiple matching Materials.

## Nested Class Summary

## Nested classes/interfaces inherited from interface org.bukkit.inventory.RecipeChoice

`RecipeChoice.ExactChoice, RecipeChoice.MaterialChoice`

## Constructor Summary

Constructors
Constructor
Description
`MaterialChoice(@NotNull List<Material> choices)`
`MaterialChoice(@NotNull Material choice)`
`MaterialChoice(@NotNull Material... choices)`
`MaterialChoice(@NotNull Tag<Material> choices)`
Constructs a MaterialChoice with the current values of the specified tag.

## Method Summary

Modifier and Type
Method
Description
`@NotNull RecipeChoice.MaterialChoice`
`clone()`
`boolean`
`equals(Object obj)`
`@NotNull List<Material>`
`getChoices()`
`@NotNull ItemStack`
`getItemStack()`
Gets a single item stack representative of this stack choice.
`int`
`hashCode()`
`boolean`
`test(@NotNull ItemStack t)`
`String`
`toString()`

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.util.function.Predicate

`and, negate, or`

## Constructor Details

### MaterialChoice

public MaterialChoice(@NotNull @NotNull Material choice)

### MaterialChoice

public MaterialChoice(@NotNull @NotNull Material... choices)

### MaterialChoice

public MaterialChoice(@NotNull @NotNull Tag<Material> choices)
Constructs a MaterialChoice with the current values of the specified tag.

Parameters:
  `choices` - the tag

### MaterialChoice

public MaterialChoice(@NotNull @NotNull List<Material> choices)

## Method Details

### test

public boolean test(@NotNull @NotNull ItemStack t)

Specified by:
  `test` in interface `Predicate<ItemStack>`
Specified by:
  `test` in interface `RecipeChoice`

### getItemStack

@NotNull public @NotNull ItemStack getItemStack()
Description copied from interface: `RecipeChoice`
Gets a single item stack representative of this stack choice.

Specified by:
  `getItemStack` in interface `RecipeChoice`
Returns:
  a single representative item

### getChoices

@NotNull public @NotNull List<Material> getChoices()

### clone

@NotNull public @NotNull RecipeChoice.MaterialChoice clone()

Specified by:
  `clone` in interface `RecipeChoice`
Overrides:
  `clone` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

### toString

public String toString()

Overrides:
  `toString` in class `Object`