forked from pchmn/MaterialChipsInput
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Chip.java
78 lines (63 loc) · 1.86 KB
/
Chip.java
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package com.materialchips.model;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class Chip implements ChipInterface {
private Object id;
private Uri avatarUri;
private Drawable avatarDrawable;
private String label;
private String info;
public Chip(@NonNull Object id, @Nullable Uri avatarUri, @NonNull String label, @Nullable String info) {
this.id = id;
this.avatarUri = avatarUri;
this.label = label;
this.info = info;
}
public Chip(@NonNull Object id, @Nullable Drawable avatarDrawable, @NonNull String label, @Nullable String info) {
this.id = id;
this.avatarDrawable = avatarDrawable;
this.label = label;
this.info = info;
}
public Chip(@Nullable Uri avatarUri, @NonNull String label, @Nullable String info) {
this.avatarUri = avatarUri;
this.label = label;
this.info = info;
}
public Chip(@Nullable Drawable avatarDrawable, @NonNull String label, @Nullable String info) {
this.avatarDrawable = avatarDrawable;
this.label = label;
this.info = info;
}
public Chip(@NonNull Object id, @NonNull String label, @Nullable String info) {
this.id = id;
this.label = label;
this.info = info;
}
public Chip(@NonNull String label, @Nullable String info) {
this.label = label;
this.info = info;
}
@Override
public Object getId() {
return id;
}
@Override
public Uri getAvatarUri() {
return avatarUri;
}
@Override
public Drawable getAvatarDrawable() {
return avatarDrawable;
}
@Override
public String getLabel() {
return label;
}
@Override
public String getInfo() {
return info;
}
}