Package nxt.voting
Class PhasingParams
java.lang.Object
nxt.voting.PhasingParams
Phasing poll data. Handles the serialization, deserialization and validation of phasing poll parameters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPhasingParams(ByteBuffer buffer) PhasingParams(VoteWeighting voteWeighting, long quorum, long[] whitelist, List<ChainTransactionId> linkedTransactionsIds, PhasingParams.HashVoting hashVoting, PhasingParams.CompositeVoting compositeVoting, PhasingParams.PropertyVoting senderPropertyVoting, PhasingParams.PropertyVoting recipientPropertyVoting) PhasingParams(VoteWeighting voteWeighting, long quorum, Supplier<long[]> whitelistSupplier, Supplier<List<ChainTransactionId>> linkedTransactionsSupplier, PhasingParams.HashVoting hashVoting, PhasingParams.CompositeVoting compositeVoting, PhasingParams.PropertyVoting senderPropertyVoting, PhasingParams.PropertyVoting recipientPropertyVoting) PhasingParams(org.json.simple.JSONObject attachmentData) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanvoidbooleanbytebyte[]intlonglong[]inthashCode()booleanisAccountWhitelisted(long accountId) voidputMyBytes(ByteBuffer buffer) voidputMyJSON(org.json.simple.JSONObject json) static intsetCommonColumnValues(PhasingParams params, PreparedStatement pstmt, int i) toString()void
-
Field Details
-
COMMON_COLUMN_NAMES
- See Also:
-
COMMON_COLUMN_PARAMETER_MARKERS
- See Also:
-
-
Constructor Details
-
PhasingParams
- Throws:
NxtException.NotValidException
-
PhasingParams
public PhasingParams(org.json.simple.JSONObject attachmentData) -
PhasingParams
public PhasingParams(VoteWeighting voteWeighting, long quorum, long[] whitelist, List<ChainTransactionId> linkedTransactionsIds, PhasingParams.HashVoting hashVoting, PhasingParams.CompositeVoting compositeVoting, PhasingParams.PropertyVoting senderPropertyVoting, PhasingParams.PropertyVoting recipientPropertyVoting) -
PhasingParams
public PhasingParams(VoteWeighting voteWeighting, long quorum, Supplier<long[]> whitelistSupplier, Supplier<List<ChainTransactionId>> linkedTransactionsSupplier, PhasingParams.HashVoting hashVoting, PhasingParams.CompositeVoting compositeVoting, PhasingParams.PropertyVoting senderPropertyVoting, PhasingParams.PropertyVoting recipientPropertyVoting)
-
-
Method Details
-
getMySize
public int getMySize() -
putMyBytes
-
putMyJSON
public void putMyJSON(org.json.simple.JSONObject json) -
validateRestrictableParams
- Throws:
NxtException.ValidationException
-
checkApprovable
-
isAccountWhitelisted
public boolean isAccountWhitelisted(long accountId) -
acceptsVotes
public boolean acceptsVotes() -
getQuorum
public long getQuorum() -
getWhitelist
public long[] getWhitelist() -
getVoteWeighting
-
getLinkedTransactionsIds
-
getHashedSecret
public byte[] getHashedSecret() -
getAlgorithm
public byte getAlgorithm() -
getExpressionStr
-
getExpression
-
getSubPolls
-
getSenderPropertyVoting
-
getRecipientPropertyVoting
-
getHashVoting
-
allowEarlyFinish
public boolean allowEarlyFinish() -
allowFinishAtCreation
public boolean allowFinishAtCreation() -
equals
-
hashCode
public int hashCode() -
toString
-
setCommonColumnValues
public static int setCommonColumnValues(PhasingParams params, PreparedStatement pstmt, int i) throws SQLException - Throws:
SQLException
-