java.lang.Object
org.ntnu.idi.idatt2106.sparesti.sparestibackend.model.Goal
All Implemented Interfaces:
Comparable<Goal>

@Entity public class Goal extends Object implements Comparable<Goal>
Represents a financial goal set by a user. Goals track progress towards a financial target, prioritized by the user, with a set timeframe and other descriptive details. Implements Comparable to enable sorting based on priority.
Author:
Y.A Marouga
  • Constructor Details

    • Goal

      public Goal()
  • Method Details

    • compareTo

      public int compareTo(Goal goal)
      Compares this goal with another to order goals based on their priority. Higher priorities are considered greater in this comparison.
      Specified by:
      compareTo in interface Comparable<Goal>
      Parameters:
      goal - The goal to compare with this instance.
      Returns:
      a negative integer, zero, or a positive integer as this goal's priority is less than, equal to, or greater than the specified goal's priority.