- All Implemented Interfaces:
Serializable,Comparable<FeeEstimateMode>,Constable
Enum for the fee estimate mode.
Determines how the fee estimate is calculated for a transaction.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription(package private) static FeeEstimateModefromString(String value) Convert a string value to the corresponding enum.toString()(package private) static FeeEstimateModevalueOf(int code) Convert a protobuf-encoded fee estimate mode value to the corresponding enum.static FeeEstimateModeReturns the enum constant of this class with the specified name.static FeeEstimateMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STATE
Uses latest known state.This mode calculates fees based on the current state of the network, taking into account all state-dependent factors such as current exchange rates, gas prices, and network congestion.
-
INTRINSIC
Default mode: ignores state-dependent factors.This mode calculates fees based only on the intrinsic properties of the transaction itself, ignoring dynamic network conditions. This provides a baseline estimate that doesn't fluctuate with network state.
-
-
Field Details
-
code
final int code
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
Convert a string value to the corresponding enum.- Parameters:
value- the string value of the mode- Returns:
- the corresponding FeeEstimateMode
- Throws:
IllegalArgumentException- if the value is not recognized
-
valueOf
Convert a protobuf-encoded fee estimate mode value to the corresponding enum.- Parameters:
code- the protobuf-encoded value- Returns:
- the corresponding FeeEstimateMode
- Throws:
IllegalArgumentException- if the code is not recognized
-
toString
- Overrides:
toStringin classEnum<FeeEstimateMode>
-