Package no.priv.bang.ukelonn.beans
Record Class Bonus
java.lang.Object
java.lang.Record
no.priv.bang.ukelonn.beans.Bonus
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleThe field for thebonusFactorrecord component.private final intThe field for thebonusIdrecord component.private final StringThe field for thedescriptionrecord component.private final booleanThe field for theenabledrecord component.private final DateThe field for theendDaterecord component.private final StringThe field for theiconurlrecord component.private final DateThe field for thestartDaterecord component.private final StringThe field for thetitlerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thebonusFactorrecord component.intbonusId()Returns the value of thebonusIdrecord component.Returns the value of thedescriptionrecord component.booleanenabled()Returns the value of theenabledrecord component.endDate()Returns the value of theendDaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iconurl()Returns the value of theiconurlrecord component.Returns the value of thestartDaterecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.static Bonus.Builderwith()
-
Field Details
-
bonusId
private final int bonusIdThe field for thebonusIdrecord component. -
enabled
private final boolean enabledThe field for theenabledrecord component. -
iconurl
The field for theiconurlrecord component. -
title
The field for thetitlerecord component. -
description
The field for thedescriptionrecord component. -
bonusFactor
private final double bonusFactorThe field for thebonusFactorrecord component. -
startDate
The field for thestartDaterecord component. -
endDate
The field for theendDaterecord component.
-
-
Constructor Details
-
Bonus
public Bonus(int bonusId, boolean enabled, String iconurl, String title, String description, double bonusFactor, Date startDate, Date endDate) Creates an instance of aBonusrecord class.- Parameters:
bonusId- the value for thebonusIdrecord componentenabled- the value for theenabledrecord componenticonurl- the value for theiconurlrecord componenttitle- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componentbonusFactor- the value for thebonusFactorrecord componentstartDate- the value for thestartDaterecord componentendDate- the value for theendDaterecord 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 '=='. -
bonusId
public int bonusId()Returns the value of thebonusIdrecord component.- Returns:
- the value of the
bonusIdrecord component
-
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
iconurl
Returns the value of theiconurlrecord component.- Returns:
- the value of the
iconurlrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
bonusFactor
public double bonusFactor()Returns the value of thebonusFactorrecord component.- Returns:
- the value of the
bonusFactorrecord component
-
startDate
Returns the value of thestartDaterecord component.- Returns:
- the value of the
startDaterecord component
-
endDate
Returns the value of theendDaterecord component.- Returns:
- the value of the
endDaterecord component
-