Record Class Bonus

java.lang.Object
java.lang.Record
no.priv.bang.ukelonn.beans.Bonus

public record Bonus(int bonusId, boolean enabled, String iconurl, String title, String description, double bonusFactor, Date startDate, Date endDate) extends Record
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final double
    The field for the bonusFactor record component.
    private final int
    The field for the bonusId record component.
    private final String
    The field for the description record component.
    private final boolean
    The field for the enabled record component.
    private final Date
    The field for the endDate record component.
    private final String
    The field for the iconurl record component.
    private final Date
    The field for the startDate record component.
    private final String
    The field for the title record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Bonus(int bonusId, boolean enabled, String iconurl, String title, String description, double bonusFactor, Date startDate, Date endDate)
    Creates an instance of a Bonus record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the bonusFactor record component.
    int
    Returns the value of the bonusId record component.
    Returns the value of the description record component.
    boolean
    Returns the value of the enabled record component.
    Returns the value of the endDate record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the iconurl record component.
    Returns the value of the startDate record component.
    Returns the value of the title record component.
    final String
    Returns a string representation of this record class.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • bonusId

      private final int bonusId
      The field for the bonusId record component.
    • enabled

      private final boolean enabled
      The field for the enabled record component.
    • iconurl

      private final String iconurl
      The field for the iconurl record component.
    • title

      private final String title
      The field for the title record component.
    • description

      private final String description
      The field for the description record component.
    • bonusFactor

      private final double bonusFactor
      The field for the bonusFactor record component.
    • startDate

      private final Date startDate
      The field for the startDate record component.
    • endDate

      private final Date endDate
      The field for the endDate record 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 a Bonus record class.
      Parameters:
      bonusId - the value for the bonusId record component
      enabled - the value for the enabled record component
      iconurl - the value for the iconurl record component
      title - the value for the title record component
      description - the value for the description record component
      bonusFactor - the value for the bonusFactor record component
      startDate - the value for the startDate record component
      endDate - the value for the endDate record component
  • Method Details

    • with

      public static Bonus.Builder with()
    • 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.
    • bonusId

      public int bonusId()
      Returns the value of the bonusId record component.
      Returns:
      the value of the bonusId record component
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • iconurl

      public String iconurl()
      Returns the value of the iconurl record component.
      Returns:
      the value of the iconurl record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • bonusFactor

      public double bonusFactor()
      Returns the value of the bonusFactor record component.
      Returns:
      the value of the bonusFactor record component
    • startDate

      public Date startDate()
      Returns the value of the startDate record component.
      Returns:
      the value of the startDate record component
    • endDate

      public Date endDate()
      Returns the value of the endDate record component.
      Returns:
      the value of the endDate record component