Package no.priv.bang.ukelonn.beans
Record Class TransactionType
java.lang.Object
java.lang.Record
no.priv.bang.ukelonn.beans.TransactionType
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theidrecord component.private final DoubleThe field for thetransactionAmountrecord component.private final booleanThe field for thetransactionIsWagePaymentrecord component.private final booleanThe field for thetransactionIsWorkrecord component.private final StringThe field for thetransactionTypeNamerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTransactionType(int id, String transactionTypeName, Double transactionAmount, boolean transactionIsWork, boolean transactionIsWagePayment) Creates an instance of aTransactionTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransactionAmountrecord component.booleanReturns the value of thetransactionIsWagePaymentrecord component.booleanReturns the value of thetransactionIsWorkrecord component.Returns the value of thetransactionTypeNamerecord component.static TransactionType.Builderwith()static TransactionType.Builderwith(TransactionType transactiontype)
-
Field Details
-
id
private final int idThe field for theidrecord component. -
transactionTypeName
The field for thetransactionTypeNamerecord component. -
transactionAmount
The field for thetransactionAmountrecord component. -
transactionIsWork
private final boolean transactionIsWorkThe field for thetransactionIsWorkrecord component. -
transactionIsWagePayment
private final boolean transactionIsWagePaymentThe field for thetransactionIsWagePaymentrecord component.
-
-
Constructor Details
-
TransactionType
public TransactionType(int id, String transactionTypeName, Double transactionAmount, boolean transactionIsWork, boolean transactionIsWagePayment) Creates an instance of aTransactionTyperecord class.- Parameters:
id- the value for theidrecord componenttransactionTypeName- the value for thetransactionTypeNamerecord componenttransactionAmount- the value for thetransactionAmountrecord componenttransactionIsWork- the value for thetransactionIsWorkrecord componenttransactionIsWagePayment- the value for thetransactionIsWagePaymentrecord component
-
-
Method Details
-
with
-
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 '=='. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
transactionTypeName
Returns the value of thetransactionTypeNamerecord component.- Returns:
- the value of the
transactionTypeNamerecord component
-
transactionAmount
Returns the value of thetransactionAmountrecord component.- Returns:
- the value of the
transactionAmountrecord component
-
transactionIsWork
public boolean transactionIsWork()Returns the value of thetransactionIsWorkrecord component.- Returns:
- the value of the
transactionIsWorkrecord component
-
transactionIsWagePayment
public boolean transactionIsWagePayment()Returns the value of thetransactionIsWagePaymentrecord component.- Returns:
- the value of the
transactionIsWagePaymentrecord component
-