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 Summary
Modifier and TypeMethodDescriptionboolean
contains
(ResourceKey resource) Retrieves all resources and their amounts from the list.long
get
(ResourceKey resource) getAll()
boolean
isEmpty()
-
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
-