Package records

Record Class PayrollRecord

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

    Constructors
    Constructor
    Description
    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 a PayrollRecord record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the clothingAllowance record component.
    int
    Returns the value of the employeeID record component.
    Returns the value of the employeeName record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    double
    Returns the value of the grossIncome record component.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the hourlyRate record component.
    double
    Returns the value of the hoursWorked record component.
    double
    Returns the value of the netIncome record component.
    double
    Returns the value of the overTimePay record component.
    double
    Returns the value of the pagIbigDeduction record component.
    Returns the value of the payrollID record component.
    Returns the value of the periodEnd record component.
    Returns the value of the periodStart record component.
    double
    Returns the value of the philHealthDeduction record component.
    double
    Returns the value of the phoneAllowance record component.
    Returns the value of the positionDepartment record component.
    double
    Returns the value of the riceSubsidy record component.
    double
    Returns the value of the salary record component.
    double
    Returns the value of the sssDeduction record component.
    double
    Returns the value of the taxDeduction record component.
    Returns an array containing payroll information for the employee.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the totalBenefits record component.
    double
    Returns the value of the totalDeductions record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a PayrollRecord record class.
      Parameters:
      payrollID - the value for the payrollID record component
      employeeID - the value for the employeeID record component
      employeeName - the value for the employeeName record component
      periodStart - the value for the periodStart record component
      periodEnd - the value for the periodEnd record component
      positionDepartment - the value for the positionDepartment record component
      salary - the value for the salary record component
      hourlyRate - the value for the hourlyRate record component
      hoursWorked - the value for the hoursWorked record component
      overTimePay - the value for the overTimePay record component
      riceSubsidy - the value for the riceSubsidy record component
      phoneAllowance - the value for the phoneAllowance record component
      clothingAllowance - the value for the clothingAllowance record component
      sssDeduction - the value for the sssDeduction record component
      philHealthDeduction - the value for the philHealthDeduction record component
      pagIbigDeduction - the value for the pagIbigDeduction record component
      taxDeduction - the value for the taxDeduction record component
      totalBenefits - the value for the totalBenefits record component
      totalDeductions - the value for the totalDeductions record component
      grossIncome - the value for the grossIncome record component
      netIncome - the value for the netIncome record component
  • Method Details

    • toArray

      public String[] toArray()
      Returns an array containing payroll information for the employee.
      Returns:
      an array of strings representing the payroll information
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • payrollID

      public String payrollID()
      Returns the value of the payrollID record component.
      Returns:
      the value of the payrollID record component
    • employeeID

      public int employeeID()
      Returns the value of the employeeID record component.
      Returns:
      the value of the employeeID record component
    • employeeName

      public String employeeName()
      Returns the value of the employeeName record component.
      Returns:
      the value of the employeeName record component
    • periodStart

      public LocalDate periodStart()
      Returns the value of the periodStart record component.
      Returns:
      the value of the periodStart record component
    • periodEnd

      public LocalDate periodEnd()
      Returns the value of the periodEnd record component.
      Returns:
      the value of the periodEnd record component
    • positionDepartment

      public String positionDepartment()
      Returns the value of the positionDepartment record component.
      Returns:
      the value of the positionDepartment record component
    • salary

      public double salary()
      Returns the value of the salary record component.
      Returns:
      the value of the salary record component
    • hourlyRate

      public double hourlyRate()
      Returns the value of the hourlyRate record component.
      Returns:
      the value of the hourlyRate record component
    • hoursWorked

      public double hoursWorked()
      Returns the value of the hoursWorked record component.
      Returns:
      the value of the hoursWorked record component
    • overTimePay

      public double overTimePay()
      Returns the value of the overTimePay record component.
      Returns:
      the value of the overTimePay record component
    • riceSubsidy

      public double riceSubsidy()
      Returns the value of the riceSubsidy record component.
      Returns:
      the value of the riceSubsidy record component
    • phoneAllowance

      public double phoneAllowance()
      Returns the value of the phoneAllowance record component.
      Returns:
      the value of the phoneAllowance record component
    • clothingAllowance

      public double clothingAllowance()
      Returns the value of the clothingAllowance record component.
      Returns:
      the value of the clothingAllowance record component
    • sssDeduction

      public double sssDeduction()
      Returns the value of the sssDeduction record component.
      Returns:
      the value of the sssDeduction record component
    • philHealthDeduction

      public double philHealthDeduction()
      Returns the value of the philHealthDeduction record component.
      Returns:
      the value of the philHealthDeduction record component
    • pagIbigDeduction

      public double pagIbigDeduction()
      Returns the value of the pagIbigDeduction record component.
      Returns:
      the value of the pagIbigDeduction record component
    • taxDeduction

      public double taxDeduction()
      Returns the value of the taxDeduction record component.
      Returns:
      the value of the taxDeduction record component
    • totalBenefits

      public double totalBenefits()
      Returns the value of the totalBenefits record component.
      Returns:
      the value of the totalBenefits record component
    • totalDeductions

      public double totalDeductions()
      Returns the value of the totalDeductions record component.
      Returns:
      the value of the totalDeductions record component
    • grossIncome

      public double grossIncome()
      Returns the value of the grossIncome record component.
      Returns:
      the value of the grossIncome record component
    • netIncome

      public double netIncome()
      Returns the value of the netIncome record component.
      Returns:
      the value of the netIncome record component