java.lang.Object
java.lang.Record
records.PayrollRecord
public record PayrollRecord(String payrollID, int employeeID, String employeeName, LocalDate periodStart, LocalDate periodEnd, String positionDepartment, double salary, double hourlyRate, double hoursWorked, double overTimePay, double riceSubsidy, double phoneAllowance, double clothingAllowance, double sssDeduction, double philHealthDeduction, double pagIbigDeduction, double taxDeduction, double totalBenefits, double totalDeductions, double grossIncome, double netIncome)
extends Record
Represents a payroll record.
It contains various financial details such as salary, deductions, and benefits.
Available methods:
-
Constructor Summary
ConstructorsConstructorDescriptionPayrollRecord(String payrollID, int employeeID, String employeeName, LocalDate periodStart, LocalDate periodEnd, String positionDepartment, double salary, double hourlyRate, double hoursWorked, double overTimePay, double riceSubsidy, double phoneAllowance, double clothingAllowance, double sssDeduction, double philHealthDeduction, double pagIbigDeduction, double taxDeduction, double totalBenefits, double totalDeductions, double grossIncome, double netIncome) Creates an instance of aPayrollRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theclothingAllowancerecord component.intReturns the value of theemployeeIDrecord component.Returns the value of theemployeeNamerecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thegrossIncomerecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thehourlyRaterecord component.doubleReturns the value of thehoursWorkedrecord component.doubleReturns the value of thenetIncomerecord component.doubleReturns the value of theoverTimePayrecord component.doubleReturns the value of thepagIbigDeductionrecord component.Returns the value of thepayrollIDrecord component.Returns the value of theperiodEndrecord component.Returns the value of theperiodStartrecord component.doubleReturns the value of thephilHealthDeductionrecord component.doubleReturns the value of thephoneAllowancerecord component.Returns the value of thepositionDepartmentrecord component.doubleReturns the value of thericeSubsidyrecord component.doublesalary()Returns the value of thesalaryrecord component.doubleReturns the value of thesssDeductionrecord component.doubleReturns the value of thetaxDeductionrecord component.String[]toArray()Returns an array containing payroll information for the employee.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetotalBenefitsrecord component.doubleReturns the value of thetotalDeductionsrecord component.
-
Constructor Details
-
PayrollRecord
public PayrollRecord(String payrollID, int employeeID, String employeeName, LocalDate periodStart, LocalDate periodEnd, String positionDepartment, double salary, double hourlyRate, double hoursWorked, double overTimePay, double riceSubsidy, double phoneAllowance, double clothingAllowance, double sssDeduction, double philHealthDeduction, double pagIbigDeduction, double taxDeduction, double totalBenefits, double totalDeductions, double grossIncome, double netIncome) Creates an instance of aPayrollRecordrecord class.- Parameters:
payrollID- the value for thepayrollIDrecord componentemployeeID- the value for theemployeeIDrecord componentemployeeName- the value for theemployeeNamerecord componentperiodStart- the value for theperiodStartrecord componentperiodEnd- the value for theperiodEndrecord componentpositionDepartment- the value for thepositionDepartmentrecord componentsalary- the value for thesalaryrecord componenthourlyRate- the value for thehourlyRaterecord componenthoursWorked- the value for thehoursWorkedrecord componentoverTimePay- the value for theoverTimePayrecord componentriceSubsidy- the value for thericeSubsidyrecord componentphoneAllowance- the value for thephoneAllowancerecord componentclothingAllowance- the value for theclothingAllowancerecord componentsssDeduction- the value for thesssDeductionrecord componentphilHealthDeduction- the value for thephilHealthDeductionrecord componentpagIbigDeduction- the value for thepagIbigDeductionrecord componenttaxDeduction- the value for thetaxDeductionrecord componenttotalBenefits- the value for thetotalBenefitsrecord componenttotalDeductions- the value for thetotalDeductionsrecord componentgrossIncome- the value for thegrossIncomerecord componentnetIncome- the value for thenetIncomerecord component
-
-
Method Details
-
toArray
Returns an array containing payroll information for the employee.- Returns:
- an array of strings representing the payroll information
-
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 '=='. -
payrollID
Returns the value of thepayrollIDrecord component.- Returns:
- the value of the
payrollIDrecord component
-
employeeID
public int employeeID()Returns the value of theemployeeIDrecord component.- Returns:
- the value of the
employeeIDrecord component
-
employeeName
Returns the value of theemployeeNamerecord component.- Returns:
- the value of the
employeeNamerecord component
-
periodStart
Returns the value of theperiodStartrecord component.- Returns:
- the value of the
periodStartrecord component
-
periodEnd
Returns the value of theperiodEndrecord component.- Returns:
- the value of the
periodEndrecord component
-
positionDepartment
Returns the value of thepositionDepartmentrecord component.- Returns:
- the value of the
positionDepartmentrecord component
-
salary
public double salary()Returns the value of thesalaryrecord component.- Returns:
- the value of the
salaryrecord component
-
hourlyRate
public double hourlyRate()Returns the value of thehourlyRaterecord component.- Returns:
- the value of the
hourlyRaterecord component
-
hoursWorked
public double hoursWorked()Returns the value of thehoursWorkedrecord component.- Returns:
- the value of the
hoursWorkedrecord component
-
overTimePay
public double overTimePay()Returns the value of theoverTimePayrecord component.- Returns:
- the value of the
overTimePayrecord component
-
riceSubsidy
public double riceSubsidy()Returns the value of thericeSubsidyrecord component.- Returns:
- the value of the
riceSubsidyrecord component
-
phoneAllowance
public double phoneAllowance()Returns the value of thephoneAllowancerecord component.- Returns:
- the value of the
phoneAllowancerecord component
-
clothingAllowance
public double clothingAllowance()Returns the value of theclothingAllowancerecord component.- Returns:
- the value of the
clothingAllowancerecord component
-
sssDeduction
public double sssDeduction()Returns the value of thesssDeductionrecord component.- Returns:
- the value of the
sssDeductionrecord component
-
philHealthDeduction
public double philHealthDeduction()Returns the value of thephilHealthDeductionrecord component.- Returns:
- the value of the
philHealthDeductionrecord component
-
pagIbigDeduction
public double pagIbigDeduction()Returns the value of thepagIbigDeductionrecord component.- Returns:
- the value of the
pagIbigDeductionrecord component
-
taxDeduction
public double taxDeduction()Returns the value of thetaxDeductionrecord component.- Returns:
- the value of the
taxDeductionrecord component
-
totalBenefits
public double totalBenefits()Returns the value of thetotalBenefitsrecord component.- Returns:
- the value of the
totalBenefitsrecord component
-
totalDeductions
public double totalDeductions()Returns the value of thetotalDeductionsrecord component.- Returns:
- the value of the
totalDeductionsrecord component
-
grossIncome
public double grossIncome()Returns the value of thegrossIncomerecord component.- Returns:
- the value of the
grossIncomerecord component
-
netIncome
public double netIncome()Returns the value of thenetIncomerecord component.- Returns:
- the value of the
netIncomerecord component
-