diff options
author | Tyler Ferrari <69283684+Sowgro@users.noreply.github.com> | 2025-03-27 18:50:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-27 18:50:33 -0400 |
commit | ddbd1cc688aa98fb275ad72a750fbaaf53e6c0ae (patch) | |
tree | 0a0f9669fb0f7cf2f2816b798269e50a8b26f125 /ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java | |
parent | 35d7c971ed47718d4dc5738edb09d62cd780dac4 (diff) | |
parent | 4f5e9e9ecda282a98af5d70bd6cf0540973c7314 (diff) | |
download | JellySolutions-ddbd1cc688aa98fb275ad72a750fbaaf53e6c0ae.tar.gz JellySolutions-ddbd1cc688aa98fb275ad72a750fbaaf53e6c0ae.tar.bz2 JellySolutions-ddbd1cc688aa98fb275ad72a750fbaaf53e6c0ae.zip |
Merge pull request #17 from RIT-SWEN-261-02/api-cleanup
Merge api-cleanup into main
Diffstat (limited to 'ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java')
-rw-r--r-- | ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java index c0e9214..22e86e3 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/model/Need.java @@ -17,14 +17,14 @@ public class Need { @JsonProperty("current") private double current; /** - * Create a new need + * Create a new need, used by the controller * * @param name The name of the need * @param id The unique ID of the need * @param maxGoal The maximum goal for this need * @param type The type of need (monetary, physical) */ - public Need(@JsonProperty("name") String name, @JsonProperty("id") int id, @JsonProperty("maxGoal") double maxGoal, GoalType type) { + public Need(@JsonProperty("name") String name, @JsonProperty("id") int id, @JsonProperty("maxGoal") double maxGoal, @JsonProperty("type") GoalType type) { this.id = id; this.name = name; this.maxGoal = maxGoal; @@ -86,6 +86,10 @@ public class Need { this.current = current; } + public void incrementCurrent(double incrementAmount) { + this.current += incrementAmount; + } + public void setFilterAttributes(String[] filterAttributes) { this.filterAttributes = filterAttributes; } |