-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor/made ConstructionFormData.java into a public class
refactor/answer switches (in List<String> answers) give "true"/"false" in firebase refactor/clean up all comments and unused code
- Loading branch information
IbrahimSaeedPurdue
authored and
IbrahimSaeedPurdue
committed
Mar 4, 2021
1 parent
9c2ca34
commit 5af5a1c
Showing
2 changed files
with
76 additions
and
84 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
app/src/main/java/com/sf/stormwaterutilityandroid/ConstructionFormData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.sf.stormwaterutilityandroid; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public class ConstructionFormData { | ||
private Map<String, Object> data; | ||
// String contact | ||
// String date | ||
// String inspector | ||
// String location | ||
|
||
// (they are lists because firebase doesn't serialize arrays) | ||
// List<String> answers | ||
// List<String> imgLink | ||
|
||
public ConstructionFormData(String contact, String date, String inspector, | ||
String location, List<String> answers, List<String> imgLink) { | ||
data = new HashMap<>(); | ||
data.put("contact", contact); | ||
data.put("date", date); | ||
data.put("inspector", inspector); | ||
data.put("location", location); | ||
data.put("answers", answers); | ||
data.put("imgLink", imgLink); | ||
} | ||
|
||
public Map<String, Object> getMap() { | ||
return data; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ConstructionFormData{" + | ||
"data=" + data + | ||
'}'; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters