Interface ResourceList
- All Known Subinterfaces:
FuzzyResourceList,MutableResourceList
- All Known Implementing Classes:
AbstractProxyMutableResourceList,FuzzyResourceListImpl,LazyCopyMutableResourceList,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 Summary
Modifier and TypeMethodDescriptionbooleancontains(ResourceKey resource) Retrieves all resources and their amounts from the list.longget(ResourceKey resource) getAll()booleanisEmpty()
-
Method Details
-
copyState
Collection<ResourceAmount> 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
- Parameters:
resource- the resource- Returns:
- the amount stored, or zero if not stored
-
contains
- Parameters:
resource- the resource- Returns:
- whether the list contains this resource
-
isEmpty
boolean isEmpty()- Returns:
- whether the list is empty
-