JsonArray.java
3.86 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
package com.google.gson;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public final class JsonArray
extends JsonElement
implements Iterable<JsonElement>
{
private final List<JsonElement> a = new ArrayList();
public final void add(JsonElement paramJsonElement)
{
Object localObject = paramJsonElement;
if (paramJsonElement == null) {
localObject = JsonNull.INSTANCE;
}
this.a.add(localObject);
}
public final void addAll(JsonArray paramJsonArray)
{
this.a.addAll(paramJsonArray.a);
}
public final boolean contains(JsonElement paramJsonElement)
{
return this.a.contains(paramJsonElement);
}
public final boolean equals(Object paramObject)
{
return (paramObject == this) || (((paramObject instanceof JsonArray)) && (((JsonArray)paramObject).a.equals(this.a)));
}
public final JsonElement get(int paramInt)
{
return (JsonElement)this.a.get(paramInt);
}
public final BigDecimal getAsBigDecimal()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsBigDecimal();
}
throw new IllegalStateException();
}
public final BigInteger getAsBigInteger()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsBigInteger();
}
throw new IllegalStateException();
}
public final boolean getAsBoolean()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsBoolean();
}
throw new IllegalStateException();
}
public final byte getAsByte()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsByte();
}
throw new IllegalStateException();
}
public final char getAsCharacter()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsCharacter();
}
throw new IllegalStateException();
}
public final double getAsDouble()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsDouble();
}
throw new IllegalStateException();
}
public final float getAsFloat()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsFloat();
}
throw new IllegalStateException();
}
public final int getAsInt()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsInt();
}
throw new IllegalStateException();
}
public final long getAsLong()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsLong();
}
throw new IllegalStateException();
}
public final Number getAsNumber()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsNumber();
}
throw new IllegalStateException();
}
public final short getAsShort()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsShort();
}
throw new IllegalStateException();
}
public final String getAsString()
{
if (this.a.size() == 1) {
return ((JsonElement)this.a.get(0)).getAsString();
}
throw new IllegalStateException();
}
public final int hashCode()
{
return this.a.hashCode();
}
public final Iterator<JsonElement> iterator()
{
return this.a.iterator();
}
public final JsonElement remove(int paramInt)
{
return (JsonElement)this.a.remove(paramInt);
}
public final boolean remove(JsonElement paramJsonElement)
{
return this.a.remove(paramJsonElement);
}
public final JsonElement set(int paramInt, JsonElement paramJsonElement)
{
return (JsonElement)this.a.set(paramInt, paramJsonElement);
}
public final int size()
{
return this.a.size();
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/gson/JsonArray.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/