nxt.voting

## Class PhasingParams

- java.lang.Object
- - nxt.voting.PhasingParams

-     public class PhasingParams
      extends java.lang.Object

  Phasing poll data. Handles the serialization, deserialization and validation of phasing poll parameters.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PhasingParams.CompositeVoting`
    `static class` | `PhasingParams.HashVoting`
    `static class` | `PhasingParams.PropertyVoting`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `COMMON_COLUMN_NAMES`
    `static java.lang.String` | `COMMON_COLUMN_PARAMETER_MARKERS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PhasingParams(java.nio.ByteBuffer buffer)`
    `PhasingParams(org.json.simple.JSONObject attachmentData)`
    `PhasingParams(VoteWeighting voteWeighting, long quorum, long[] whitelist, java.util.List<ChainTransactionId> linkedTransactionsIds, PhasingParams.HashVoting hashVoting, PhasingParams.CompositeVoting compositeVoting, PhasingParams.PropertyVoting senderPropertyVoting, PhasingParams.PropertyVoting recipientPropertyVoting)`
    `PhasingParams(VoteWeighting voteWeighting, long quorum, java.util.function.Supplier<long[]> whitelistSupplier, java.util.function.Supplier<java.util.List<ChainTransactionId>> linkedTransactionsSupplier, PhasingParams.HashVoting hashVoting, PhasingParams.CompositeVoting compositeVoting, PhasingParams.PropertyVoting senderPropertyVoting, PhasingParams.PropertyVoting recipientPropertyVoting)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `acceptsVotes()`
    `boolean` | `allowEarlyFinish()`
    `boolean` | `allowFinishAtCreation()`
    `void` | `checkApprovable()`
    `boolean` | `equals(java.lang.Object obj)`
    `byte` | `getAlgorithm()`
    `BooleanExpression` | `getExpression()`
    `java.lang.String` | `getExpressionStr()`
    `byte[]` | `getHashedSecret()`
    `PhasingParams.HashVoting` | `getHashVoting()`
    `java.util.List<ChainTransactionId>` | `getLinkedTransactionsIds()`
    `int` | `getMySize()`
    `long` | `getQuorum()`
    `PhasingParams.PropertyVoting` | `getRecipientPropertyVoting()`
    `PhasingParams.PropertyVoting` | `getSenderPropertyVoting()`
    `java.util.SortedMap<java.lang.String,PhasingParams>` | `getSubPolls()`
    `VoteWeighting` | `getVoteWeighting()`
    `long[]` | `getWhitelist()`
    `int` | `hashCode()`
    `boolean` | `isAccountWhitelisted(long accountId)`
    `void` | `putMyBytes(java.nio.ByteBuffer buffer)`
    `void` | `putMyJSON(org.json.simple.JSONObject json)`
    `static int` | `setCommonColumnValues(PhasingParams params, java.sql.PreparedStatement pstmt, int i)`
    `java.lang.String` | `toString()`
    `void` | `validateRestrictableParams()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### COMMON_COLUMN_NAMES

          public static final java.lang.String COMMON_COLUMN_NAMES

      See Also:
        Constant Field Values

    - #### COMMON_COLUMN_PARAMETER_MARKERS

          public static final java.lang.String COMMON_COLUMN_PARAMETER_MARKERS

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PhasingParams

          public PhasingParams(java.nio.ByteBuffer buffer)
                        throws NxtException.NotValidException

      Throws:
        `NxtException.NotValidException`

    - #### PhasingParams

          public PhasingParams(org.json.simple.JSONObject attachmentData)

    - #### PhasingParams

          public PhasingParams(VoteWeighting voteWeighting,
                               long quorum,
                               long[] whitelist,
                               java.util.List<ChainTransactionId> linkedTransactionsIds,
                               PhasingParams.HashVoting hashVoting,
                               PhasingParams.CompositeVoting compositeVoting,
                               PhasingParams.PropertyVoting senderPropertyVoting,
                               PhasingParams.PropertyVoting recipientPropertyVoting)

    - #### PhasingParams

          public PhasingParams(VoteWeighting voteWeighting,
                               long quorum,
                               java.util.function.Supplier<long[]> whitelistSupplier,
                               java.util.function.Supplier<java.util.List<ChainTransactionId>> linkedTransactionsSupplier,
                               PhasingParams.HashVoting hashVoting,
                               PhasingParams.CompositeVoting compositeVoting,
                               PhasingParams.PropertyVoting senderPropertyVoting,
                               PhasingParams.PropertyVoting recipientPropertyVoting)

  - ### Method Detail

    - #### getMySize

          public int getMySize()

    - #### putMyBytes

          public void putMyBytes(java.nio.ByteBuffer buffer)

    - #### putMyJSON

          public void putMyJSON(org.json.simple.JSONObject json)

    - #### validateRestrictableParams

          public void validateRestrictableParams()
                                          throws NxtException.ValidationException

      Throws:
        `NxtException.ValidationException`

    - #### checkApprovable

          public void checkApprovable()
                               throws NxtException.NotCurrentlyValidException

      Throws:
        `NxtException.NotCurrentlyValidException`

    - #### isAccountWhitelisted

          public boolean isAccountWhitelisted(long accountId)

    - #### acceptsVotes

          public boolean acceptsVotes()

    - #### getQuorum

          public long getQuorum()

    - #### getWhitelist

          public long[] getWhitelist()

    - #### getVoteWeighting

          public VoteWeighting getVoteWeighting()

    - #### getLinkedTransactionsIds

          public java.util.List<ChainTransactionId> getLinkedTransactionsIds()

    - #### getHashedSecret

          public byte[] getHashedSecret()

    - #### getAlgorithm

          public byte getAlgorithm()

    - #### getExpressionStr

          public java.lang.String getExpressionStr()

    - #### getExpression

          public BooleanExpression getExpression()

    - #### getSubPolls

          public java.util.SortedMap<java.lang.String,PhasingParams> getSubPolls()

    - #### getSenderPropertyVoting

          public PhasingParams.PropertyVoting getSenderPropertyVoting()

    - #### getRecipientPropertyVoting

          public PhasingParams.PropertyVoting getRecipientPropertyVoting()

    - #### getHashVoting

          public PhasingParams.HashVoting getHashVoting()

    - #### allowEarlyFinish

          public boolean allowEarlyFinish()

    - #### allowFinishAtCreation

          public boolean allowFinishAtCreation()

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### setCommonColumnValues

          public static int setCommonColumnValues(PhasingParams params,
                                                  java.sql.PreparedStatement pstmt,
                                                  int i)
                                           throws java.sql.SQLException

      Throws:
        `java.sql.SQLException`