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 aPayrollRecord
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the value of theclothingAllowance
record component.int
Returns the value of theemployeeID
record component.Returns the value of theemployeeName
record component.final boolean
Indicates whether some other object is "equal to" this one.double
Returns the value of thegrossIncome
record component.final int
hashCode()
Returns a hash code value for this object.double
Returns the value of thehourlyRate
record component.double
Returns the value of thehoursWorked
record component.double
Returns the value of thenetIncome
record component.double
Returns the value of theoverTimePay
record component.double
Returns the value of thepagIbigDeduction
record component.Returns the value of thepayrollID
record component.Returns the value of theperiodEnd
record component.Returns the value of theperiodStart
record component.double
Returns the value of thephilHealthDeduction
record component.double
Returns the value of thephoneAllowance
record component.Returns the value of thepositionDepartment
record component.double
Returns the value of thericeSubsidy
record component.double
salary()
Returns the value of thesalary
record component.double
Returns the value of thesssDeduction
record component.double
Returns the value of thetaxDeduction
record component.String[]
toArray()
Returns an array containing payroll information for the employee.final String
toString()
Returns a string representation of this record class.double
Returns the value of thetotalBenefits
record component.double
Returns the value of thetotalDeductions
record 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 aPayrollRecord
record class.- Parameters:
payrollID
- the value for thepayrollID
record componentemployeeID
- the value for theemployeeID
record componentemployeeName
- the value for theemployeeName
record componentperiodStart
- the value for theperiodStart
record componentperiodEnd
- the value for theperiodEnd
record componentpositionDepartment
- the value for thepositionDepartment
record componentsalary
- the value for thesalary
record componenthourlyRate
- the value for thehourlyRate
record componenthoursWorked
- the value for thehoursWorked
record componentoverTimePay
- the value for theoverTimePay
record componentriceSubsidy
- the value for thericeSubsidy
record componentphoneAllowance
- the value for thephoneAllowance
record componentclothingAllowance
- the value for theclothingAllowance
record componentsssDeduction
- the value for thesssDeduction
record componentphilHealthDeduction
- the value for thephilHealthDeduction
record componentpagIbigDeduction
- the value for thepagIbigDeduction
record componenttaxDeduction
- the value for thetaxDeduction
record componenttotalBenefits
- the value for thetotalBenefits
record componenttotalDeductions
- the value for thetotalDeductions
record componentgrossIncome
- the value for thegrossIncome
record componentnetIncome
- the value for thenetIncome
record 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 thepayrollID
record component.- Returns:
- the value of the
payrollID
record component
-
employeeID
public int employeeID()Returns the value of theemployeeID
record component.- Returns:
- the value of the
employeeID
record component
-
employeeName
Returns the value of theemployeeName
record component.- Returns:
- the value of the
employeeName
record component
-
periodStart
Returns the value of theperiodStart
record component.- Returns:
- the value of the
periodStart
record component
-
periodEnd
Returns the value of theperiodEnd
record component.- Returns:
- the value of the
periodEnd
record component
-
positionDepartment
Returns the value of thepositionDepartment
record component.- Returns:
- the value of the
positionDepartment
record component
-
salary
public double salary()Returns the value of thesalary
record component.- Returns:
- the value of the
salary
record component
-
hourlyRate
public double hourlyRate()Returns the value of thehourlyRate
record component.- Returns:
- the value of the
hourlyRate
record component
-
hoursWorked
public double hoursWorked()Returns the value of thehoursWorked
record component.- Returns:
- the value of the
hoursWorked
record component
-
overTimePay
public double overTimePay()Returns the value of theoverTimePay
record component.- Returns:
- the value of the
overTimePay
record component
-
riceSubsidy
public double riceSubsidy()Returns the value of thericeSubsidy
record component.- Returns:
- the value of the
riceSubsidy
record component
-
phoneAllowance
public double phoneAllowance()Returns the value of thephoneAllowance
record component.- Returns:
- the value of the
phoneAllowance
record component
-
clothingAllowance
public double clothingAllowance()Returns the value of theclothingAllowance
record component.- Returns:
- the value of the
clothingAllowance
record component
-
sssDeduction
public double sssDeduction()Returns the value of thesssDeduction
record component.- Returns:
- the value of the
sssDeduction
record component
-
philHealthDeduction
public double philHealthDeduction()Returns the value of thephilHealthDeduction
record component.- Returns:
- the value of the
philHealthDeduction
record component
-
pagIbigDeduction
public double pagIbigDeduction()Returns the value of thepagIbigDeduction
record component.- Returns:
- the value of the
pagIbigDeduction
record component
-
taxDeduction
public double taxDeduction()Returns the value of thetaxDeduction
record component.- Returns:
- the value of the
taxDeduction
record component
-
totalBenefits
public double totalBenefits()Returns the value of thetotalBenefits
record component.- Returns:
- the value of the
totalBenefits
record component
-
totalDeductions
public double totalDeductions()Returns the value of thetotalDeductions
record component.- Returns:
- the value of the
totalDeductions
record component
-
grossIncome
public double grossIncome()Returns the value of thegrossIncome
record component.- Returns:
- the value of the
grossIncome
record component
-
netIncome
public double netIncome()Returns the value of thenetIncome
record component.- Returns:
- the value of the
netIncome
record component
-