Interface ResourceList

All Known Subinterfaces:
FuzzyResourceList, MutableResourceList
All Known Implementing Classes:
AbstractProxyMutableResourceList, FuzzyResourceListImpl, ListenableResourceList, MutableResourceListImpl

@API(status=STABLE, since="2.0.0-milestone.1.2") public interface ResourceList
Represents a list of resources of an arbitrary type.
  • Method Details

    • copyState

      Retrieves all resources and their amounts from the list.
      Returns:
      a list of resource amounts
    • getAll

      Set<ResourceKey> getAll()
      Returns:
      set of resources contained in this list
    • get

      long get(ResourceKey resource)
      Parameters:
      resource - the resource
      Returns:
      the amount stored, or zero if not stored
    • contains

      boolean contains(ResourceKey resource)
      Parameters:
      resource - the resource
      Returns:
      whether the list contains this resource
    • isEmpty

      boolean isEmpty()
      Returns:
      whether the list is empty