Package no.priv.bang.ukelonn.beans
Record Class PerformedTransaction
java.lang.Object
java.lang.Record
no.priv.bang.ukelonn.beans.PerformedTransaction
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AccountThe field for theaccountrecord component.private final doubleThe field for thetransactionAmountrecord component.private final DateThe field for thetransactionDaterecord component.private final intThe field for thetransactionTypeIdrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPerformedTransaction(Account account, int transactionTypeId, double transactionAmount, Date transactionDate) Creates an instance of aPerformedTransactionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaccount()Returns the value of theaccountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetransactionAmountrecord component.Returns the value of thetransactionDaterecord component.intReturns the value of thetransactionTypeIdrecord component.static PerformedTransaction.Builderwith()
-
Field Details
-
account
The field for theaccountrecord component. -
transactionTypeId
private final int transactionTypeIdThe field for thetransactionTypeIdrecord component. -
transactionAmount
private final double transactionAmountThe field for thetransactionAmountrecord component. -
transactionDate
The field for thetransactionDaterecord component.
-
-
Constructor Details
-
PerformedTransaction
public PerformedTransaction(Account account, int transactionTypeId, double transactionAmount, Date transactionDate) Creates an instance of aPerformedTransactionrecord class.- Parameters:
account- the value for theaccountrecord componenttransactionTypeId- the value for thetransactionTypeIdrecord componenttransactionAmount- the value for thetransactionAmountrecord componenttransactionDate- the value for thetransactionDaterecord component
-
-
Method Details
-
with
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
account
Returns the value of theaccountrecord component.- Returns:
- the value of the
accountrecord component
-
transactionTypeId
public int transactionTypeId()Returns the value of thetransactionTypeIdrecord component.- Returns:
- the value of the
transactionTypeIdrecord component
-
transactionAmount
public double transactionAmount()Returns the value of thetransactionAmountrecord component.- Returns:
- the value of the
transactionAmountrecord component
-
transactionDate
Returns the value of thetransactionDaterecord component.- Returns:
- the value of the
transactionDaterecord component
-