Interface HTResourceView
-
- All Implemented Interfaces:
-
hiiragi283.core.api.storage.amount.HTAmountView,hiiragi283.core.api.storage.amount.HTAmountView.IntSized
public interface HTResourceView<RESOURCE extends HTResourceType<?>> implements HTAmountView.IntSized
単一の不変のリソースを保持するインターフェースです。
- Since:
0.1.0
Hiiragi Tsubasa
-
-
Method Summary
Modifier and Type Method Description abstract RESOURCEgetResource()保持しているリソースを取得します。 abstract IntegergetCapacity(RESOURCE resource)指定したresourceから容量を取得します。 IntegergetCapacity()容量を返します。 IntegergetNeeded(RESOURCE resource)指定したresourceから空き容量を取得します。 FractiongetStoredLevel(RESOURCE resource)指定したresourceから占有率を取得します。 -
Methods inherited from class hiiragi283.core.api.storage.amount.HTAmountView.IntSized
getNeeded, getStoredLevel -
Methods inherited from class hiiragi283.core.api.storage.amount.HTAmountView
getAmount -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getResource
abstract RESOURCE getResource()
保持しているリソースを取得します。
-
getCapacity
abstract Integer getCapacity(RESOURCE resource)
指定したresourceから容量を取得します。
- Returns:
Int型での容量
-
getCapacity
Integer getCapacity()
容量を返します。
-
getStoredLevel
Fraction getStoredLevel(RESOURCE resource)
指定したresourceから占有率を取得します。
- Returns:
Fraction型での占有率
-
-
-
-