nxt.account

## Class AccountLedger.LedgerEntry

- java.lang.Object
- - nxt.account.AccountLedger.LedgerEntry

- Enclosing class:
    AccountLedger

      public static class AccountLedger.LedgerEntry
      extends java.lang.Object

  Ledger entry

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LedgerEntry(AccountLedger.LedgerEvent event, AccountLedger.LedgerEventId ledgerEventId, long accountId, AccountLedger.LedgerHolding holding, long holdingId, long change, long balance)` Create a ledger entry

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)` Check if two ledger events are equal
    `long` | `getAccountId()` Return the account identifier
    `long` | `getBalance()` Return the new balance
    `long` | `getBlockId()` Return the block identifier
    `int` | `getChainId()` Return the chain identifier
    `long` | `getChange()` Return the balance change
    `AccountLedger.LedgerEvent` | `getEvent()` Return the ledger event
    `byte[]` | `getEventHash()` Return the associated event hash for transaction events
    `long` | `getEventId()` Return the associated event identifier
    `int` | `getHeight()` Return the height
    `AccountLedger.LedgerHolding` | `getHolding()` Return the holding
    `long` | `getHoldingId()` Return the holding identifier
    `long` | `getLedgerId()` Return the ledger identifier
    `int` | `getTimestamp()` Return the timestamp
    `int` | `hashCode()` Return the hash code

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

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

- - ### Constructor Detail

    - #### LedgerEntry

          public LedgerEntry(AccountLedger.LedgerEvent event,
                             AccountLedger.LedgerEventId ledgerEventId,
                             long accountId,
                             AccountLedger.LedgerHolding holding,
                             long holdingId,
                             long change,
                             long balance)

      Create a ledger entry
      Parameters:
        `event` - Event
        `ledgerEventId` - Event identifier
        `accountId` - Account identifier
        `holding` - Holding or null
        `holdingId` - Holding identifier or null
        `change` - Change in balance
        `balance` - New balance

  - ### Method Detail

    - #### getLedgerId

          public long getLedgerId()

      Return the ledger identifier
      Returns:
        Ledger identifier or -1 if not set

    - #### getEvent

          public AccountLedger.LedgerEvent getEvent()

      Return the ledger event
      Returns:
        Ledger event

    - #### getEventId

          public long getEventId()

      Return the associated event identifier
      Returns:
        Event identifier

    - #### getEventHash

          public byte[] getEventHash()

      Return the associated event hash for transaction events
      Returns:
        Event full hash

    - #### getChainId

          public int getChainId()

      Return the chain identifier
      Returns:
        Chain id

    - #### getAccountId

          public long getAccountId()

      Return the account identifier
      Returns:
        Account identifier

    - #### getHolding

          public AccountLedger.LedgerHolding getHolding()

      Return the holding
      Returns:
        Holding

    - #### getHoldingId

          public long getHoldingId()

      Return the holding identifier
      Returns:
        Holding identifier

    - #### getChange

          public long getChange()

      Return the balance change
      Returns:
        Balance changes

    - #### getBalance

          public long getBalance()

      Return the new balance
      Returns:
        New balance

    - #### getBlockId

          public long getBlockId()

      Return the block identifier
      Returns:
        Block identifier

    - #### getHeight

          public int getHeight()

      Return the height
      Returns:
        Height

    - #### getTimestamp

          public int getTimestamp()

      Return the timestamp
      Returns:
        Timestamp

    - #### hashCode

          public int hashCode()

      Return the hash code
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        Hash code

    - #### equals

          public boolean equals(java.lang.Object obj)

      Check if two ledger events are equal
      Overrides:
        `equals` in class `java.lang.Object`
      Parameters:
        `obj` - Ledger event to check
      Returns:
        TRUE if the ledger events are the same