IndexableStickerPack.java
4 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
package com.bitstrips.imoji.firebase.models;
import com.bitstrips.imoji.models.Sticker;
import com.bitstrips.imoji.models.StickerPack;
import com.google.firebase.appindexing.FirebaseAppIndexingException;
import com.google.firebase.appindexing.Indexable;
import com.google.firebase.appindexing.Indexable.Builder;
import com.google.gson.annotations.SerializedName;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.commons.lang3.builder.EqualsBuilder;
public class IndexableStickerPack
implements Serializable
{
private static final String INDEXABLE_TYPE = "StickerPack";
private static final String KEYWORDS_KEY = "keywords";
private static final String STICKERS_KEY = "hasSticker";
@SerializedName("stickers")
List<IndexableSticker> mStickers;
@SerializedName("title")
String mTitle;
@SerializedName("url")
String mUrl;
private IndexableStickerPack(String paramString1, String paramString2, List<IndexableSticker> paramList)
{
this.mTitle = paramString1;
this.mUrl = paramString2;
this.mStickers = paramList;
}
public boolean equals(Object paramObject)
{
if (paramObject == this) {
return true;
}
if (!(paramObject instanceof IndexableStickerPack)) {
return false;
}
paramObject = (IndexableStickerPack)paramObject;
return new EqualsBuilder().append(this.mTitle, ((IndexableStickerPack)paramObject).getTitle()).append(this.mUrl, ((IndexableStickerPack)paramObject).getUrl()).append(this.mStickers, ((IndexableStickerPack)paramObject).getStickers()).isEquals();
}
public List<IndexableSticker> getStickers()
{
return this.mStickers;
}
public String getTitle()
{
return this.mTitle;
}
public String getUrl()
{
return this.mUrl;
}
public int hashCode()
{
return this.mTitle.hashCode();
}
public Indexable toIndexable()
throws FirebaseAppIndexingException
{
Indexable.Builder localBuilder = (Indexable.Builder)((Indexable.Builder)new Indexable.Builder("StickerPack").setName(this.mTitle)).put("keywords", new String[] { this.mTitle });
if (this.mUrl != null) {
localBuilder.setUrl(this.mUrl);
}
if ((this.mStickers != null) && (!this.mStickers.isEmpty()))
{
Indexable[] arrayOfIndexable = new Indexable[this.mStickers.size()];
int i = 0;
while (i < this.mStickers.size())
{
arrayOfIndexable[i] = ((IndexableSticker)this.mStickers.get(i)).toStickerPackStickerIndexable();
i += 1;
}
localBuilder.put("hasSticker", arrayOfIndexable);
}
return localBuilder.build();
}
public static class Builder
{
private List<IndexableSticker> mStickers;
private String mTitle;
private String mUrl;
public IndexableStickerPack build()
{
return new IndexableStickerPack(this.mTitle, this.mUrl, this.mStickers, null);
}
public Builder fromStickerPack(StickerPack paramStickerPack)
{
this.mTitle = paramStickerPack.getTitle();
this.mUrl = paramStickerPack.getUrl();
ArrayList localArrayList = new ArrayList();
paramStickerPack = paramStickerPack.getStickers().iterator();
while (paramStickerPack.hasNext())
{
Sticker localSticker = (Sticker)paramStickerPack.next();
localArrayList.add(new IndexableSticker.Builder().fromSticker(localSticker).build());
}
this.mStickers = localArrayList;
return this;
}
public Builder setStickers(List<IndexableSticker> paramList)
{
this.mStickers = paramList;
return this;
}
public Builder setTitle(String paramString)
{
this.mTitle = paramString;
return this;
}
public Builder setUrl(String paramString)
{
this.mUrl = paramString;
return this;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/firebase/models/IndexableStickerPack.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/