Package nxt
Class AccountLedger.LedgerEntry
- java.lang.Object
-
- nxt.AccountLedger.LedgerEntry
-
- Enclosing class:
- AccountLedger
public static class AccountLedger.LedgerEntry extends java.lang.Object
Ledger entry
-
-
Constructor Summary
Constructors Constructor Description LedgerEntry(AccountLedger.LedgerEvent event, long eventId, long accountId, long change, long balance)
Create a ledger entryLedgerEntry(AccountLedger.LedgerEvent event, long eventId, long accountId, AccountLedger.LedgerHolding holding, java.lang.Long holdingId, long change, long balance)
Create a ledger entry
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Check if two ledger events are equallong
getAccountId()
Return the account identifierlong
getBalance()
Return the new balancelong
getBlockId()
Return the block identifierlong
getChange()
Return the balance changeAccountLedger.LedgerEvent
getEvent()
Return the ledger eventlong
getEventId()
Return the associated event identifierint
getHeight()
Return the heightAccountLedger.LedgerHolding
getHolding()
Return the holdingjava.lang.Long
getHoldingId()
Return the holding identifierlong
getLedgerId()
Return the ledger identifierint
getTimestamp()
Return the timestampint
hashCode()
Return the hash code
-
-
-
Constructor Detail
-
LedgerEntry
public LedgerEntry(AccountLedger.LedgerEvent event, long eventId, long accountId, AccountLedger.LedgerHolding holding, java.lang.Long holdingId, long change, long balance)
Create a ledger entry- Parameters:
event
- EventeventId
- Event identifieraccountId
- Account identifierholding
- Holding or nullholdingId
- Holding identifier or nullchange
- Change in balancebalance
- New balance
-
LedgerEntry
public LedgerEntry(AccountLedger.LedgerEvent event, long eventId, long accountId, long change, long balance)
Create a ledger entry- Parameters:
event
- EventeventId
- Event identifieraccountId
- Account identifierchange
- Change in balancebalance
- 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
-
getAccountId
public long getAccountId()
Return the account identifier- Returns:
- Account identifier
-
getHolding
public AccountLedger.LedgerHolding getHolding()
Return the holding- Returns:
- Holding or null if there is no holding
-
getHoldingId
public java.lang.Long getHoldingId()
Return the holding identifier- Returns:
- Holding identifier or null if there is no 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 classjava.lang.Object
- Returns:
- Hash code
-
equals
public boolean equals(java.lang.Object obj)
Check if two ledger events are equal- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- Ledger event to check- Returns:
- TRUE if the ledger events are the same
-
-