-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShopCategory.java
More file actions
42 lines (30 loc) · 977 Bytes
/
ShopCategory.java
File metadata and controls
42 lines (30 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.ikai.unitshop;
import java.net.URL;
/**
* Created by shiv on 16/11/17.
*/
class ShopCategory {
// Variable to hold category name
private String categoryName;
// Variable to hold URL of category photo.
private String categoryImageURL;
// Constructor with no argument. It is necessary for dataSnapshot.getValue(ShopCategory.class);
public ShopCategory() {}
// Constructor with category name as argument.
ShopCategory(final String categoryName) {
this.categoryName = categoryName;
}
ShopCategory(final String categoryName, final String categoryImageURL) {
this.categoryName = categoryName;
this.categoryImageURL = categoryImageURL;
}
// Make getter and setter method for this class.
// Get category name.
String getCategoryName() {
return categoryName;
}
// Get category image URL.
String getCategoryImageURL() {
return categoryImageURL;
}
}