Package nxt.account
Class AccountLedger.LedgerEntry
java.lang.Object
nxt.account.AccountLedger.LedgerEntry
- Enclosing class:
- AccountLedger
Ledger entry
-
Constructor Summary
ConstructorsConstructorDescriptionLedgerEntry(AccountLedger.LedgerEvent event, AccountLedger.LedgerEventId ledgerEventId, long accountId, AccountLedger.LedgerHolding holding, long holdingId, long change, long balance) Create a ledger entry -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if two ledger events are equallongReturn the account identifierlongReturn the new balancelongReturn the block identifierintReturn the chain identifierlongReturn the balance changegetEvent()Return the ledger eventbyte[]Return the associated event hash for transaction eventslongReturn the associated event identifierintReturn the heightReturn the holdinglongReturn the holding identifierlongReturn the ledger identifierintReturn the timestampinthashCode()Return the hash code
-
Constructor Details
-
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- EventledgerEventId- Event identifieraccountId- Account identifierholding- Holding or nullholdingId- Holding identifier or nullchange- Change in balancebalance- New balance
-
-
Method Details
-
getLedgerId
public long getLedgerId()Return the ledger identifier- Returns:
- Ledger identifier or -1 if not set
-
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
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 -
equals
Check if two ledger events are equal
-