Class Goal
java.lang.Object
org.ntnu.idi.idatt2106.sparesti.sparestibackend.model.Goal
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
-
Constructor Details
-
Goal
public Goal()
-
-
Method Details
-
compareTo
Compares this goal with another to order goals based on their priority. Higher priorities are considered greater in this comparison.- Specified by:
compareTo
in interfaceComparable<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.
-