Class FuzzyResourceListImpl
java.lang.Object
com.refinedmods.refinedstorage.api.resource.list.AbstractProxyResourceList
com.refinedmods.refinedstorage.common.support.resource.list.FuzzyResourceListImpl
- All Implemented Interfaces:
ResourceList
,FuzzyResourceList
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.refinedmods.refinedstorage.api.resource.list.ResourceList
ResourceList.OperationResult
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(ResourceKey resource, long amount) Adds a given resource to the list.getFuzzy
(ResourceKey resource) Retrieves all resources that match the normalized variant fromFuzzyModeNormalizer
.remove
(ResourceKey resource, long amount) Removes an amount of a certain resource in the list.Methods inherited from class com.refinedmods.refinedstorage.api.resource.list.AbstractProxyResourceList
clear, contains, copy, copyState, get, getAll
-
Constructor Details
-
FuzzyResourceListImpl
-
-
Method Details
-
add
Description copied from interface:ResourceList
Adds a given resource to the list.- Specified by:
add
in interfaceResourceList
- Overrides:
add
in classAbstractProxyResourceList
- Parameters:
resource
- the resource, may not be nullamount
- the amount, must be larger than 0- Returns:
- the result of the operation
-
remove
Description copied from interface:ResourceList
Removes an amount of a certain resource in the list. If the amount reaches 0 due to this removal, the resource is removed from the list.- Specified by:
remove
in interfaceResourceList
- Overrides:
remove
in classAbstractProxyResourceList
- Parameters:
resource
- the resource, may not be nullamount
- the amount, must be larger than 0- Returns:
- a result if the removal operation was successful, otherwise an empty
Optional
-
getFuzzy
Description copied from interface:FuzzyResourceList
Retrieves all resources that match the normalized variant fromFuzzyModeNormalizer
.- Specified by:
getFuzzy
in interfaceFuzzyResourceList
- Parameters:
resource
- the resource, doesn't matter if it's normalized or not- Returns:
- a list of fuzzy matched variants, or empty list if none found
-