Interface CommodityContainer


public interface CommodityContainer
Simple container providing type-based access to transferred commodities.
Since:
4.2.426
  • Method Summary

    Modifier and Type
    Method
    Description
    <A> @NotNull List<A>
    get(TransferType<A> type)
    Get the correctly typed commodities for a type.
    boolean
    Indicates the insert mode to be replace if applicable.
  • Method Details

    • get

      @NotNull <A> @NotNull List<A> get(TransferType<A> type)
      Get the correctly typed commodities for a type.
      Type Parameters:
      A - The type of the transferred commodities.
      Parameters:
      type - The transfer type to look up.
      Returns:
      The commodities (may be empty).
      Since:
      4.2.426
    • replace

      boolean replace()
      Indicates the insert mode to be replace if applicable. For example, in textual components, if true, a current selection should be replaced by the contained commodity data. Otherwise, the commodity data should be inserted at an appropriate location.
      Returns:
      true, if operating in replace mode.
      Since:
      5.0.100