Record Class HourlyRatePerService
java.lang.Object
java.lang.Record
ch.martinelli.mite4java.domain.HourlyRatePerService
-
Constructor Summary
ConstructorsConstructorDescriptionHourlyRatePerService(int serviceId, int hourlyRate) Creates an instance of aHourlyRatePerServicerecord 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.intReturns the value of thehourlyRaterecord component.intReturns the value of theserviceIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HourlyRatePerService
public HourlyRatePerService(int serviceId, int hourlyRate) Creates an instance of aHourlyRatePerServicerecord class.- Parameters:
serviceId- the value for theserviceIdrecord componenthourlyRate- the value for thehourlyRaterecord component
-
-
Method Details
-
toString
-
hashCode
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
serviceId
public int serviceId()Returns the value of theserviceIdrecord component.- Returns:
- the value of the
serviceIdrecord component
-
hourlyRate
public int hourlyRate()Returns the value of thehourlyRaterecord component.- Returns:
- the value of the
hourlyRaterecord component
-