Package org.xrpl.xrpl4j.model.ledger
Class ImmutableVoteEntry
java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableVoteEntry
- All Implemented Interfaces:
VoteEntry
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableVoteEntry
extends Object
implements VoteEntry
Immutable implementation of
VoteEntry.
Use the builder to create immutable instances:
ImmutableVoteEntry.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionaccount()The address of the LP who voted.static ImmutableVoteEntry.Builderbuilder()Creates a builder forImmutableVoteEntry.static ImmutableVoteEntryCreates an immutable copy of aVoteEntryvalue.booleanThis instance is equal to all instances ofImmutableVoteEntrythat have equal attribute values.inthashCode()Computes a hash code from attributes:account,tradingFee,voteWeight.toString()Prints the immutable valueVoteEntrywith attribute values.The trading fee that the LP voted for.The weight of the LP's vote.final ImmutableVoteEntrywithAccount(Address value) Copy the current immutable object by setting a value for theaccountattribute.final ImmutableVoteEntrywithTradingFee(TradingFee value) Copy the current immutable object by setting a value for thetradingFeeattribute.final ImmutableVoteEntrywithVoteWeight(VoteWeight value) Copy the current immutable object by setting a value for thevoteWeightattribute.
-
Method Details
-
account
The address of the LP who voted. -
tradingFee
The trading fee that the LP voted for.- Specified by:
tradingFeein interfaceVoteEntry- Returns:
- A
TradingFee.
-
voteWeight
The weight of the LP's vote.- Specified by:
voteWeightin interfaceVoteEntry- Returns:
- The
VoteWeight.
-
withAccount
Copy the current immutable object by setting a value for theaccountattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for account- Returns:
- A modified copy of the
thisobject
-
withTradingFee
Copy the current immutable object by setting a value for thetradingFeeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tradingFee- Returns:
- A modified copy of the
thisobject
-
withVoteWeight
Copy the current immutable object by setting a value for thevoteWeightattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for voteWeight- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableVoteEntrythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:account,tradingFee,voteWeight. -
toString
Prints the immutable valueVoteEntrywith attribute values. -
copyOf
Creates an immutable copy of aVoteEntryvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable VoteEntry instance
-
builder
Creates a builder forImmutableVoteEntry.ImmutableVoteEntry.builder() .account(org.xrpl.xrpl4j.model.transactions.Address) // requiredaccount.tradingFee(org.xrpl.xrpl4j.model.transactions.TradingFee) // requiredtradingFee.voteWeight(org.xrpl.xrpl4j.model.transactions.VoteWeight) // requiredvoteWeight.build();- Returns:
- A new ImmutableVoteEntry builder
-