-
Notifications
You must be signed in to change notification settings - Fork 0
/
ActionEvent
170 lines (138 loc) · 3.69 KB
/
ActionEvent
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
package com.hpe.exec;
//import com.hpe.exec.utils.AbstractParser;
//import com.hpe.exec.utils.ByteString;
//import com.hpe.exec.utils.CodedInputStream;
//import com.hpe.exec.utils.CodedOutputStream;
//import com.hpe.exec.utils.CommonMessage;
//import com.hpe.exec.utils.Descriptors;
//import com.hpe.exec.utils.ExtensionRegistryLite;
//import com.hpe.exec.utils.GeneratedMessage;
//import com.hpe.exec.utils.Internal;
//import com.hpe.exec.utils.InvalidProtocolBufferException;
//import com.hpe.exec.utils.Message;
//import com.hpe.exec.utils.Parser;
//import com.hpe.exec.utils.ProtocolMessageEnum;
//import com.hpe.exec.utils.UnknownFieldSet;
//import com.hpe.exec.utils.CommonMessage.ActionEventList.ActionEvent;
//import com.hpe.exec.utils.CommonMessage.ActionEventList.ActionEvent.ActionType;
//import com.hpe.exec.utils.CommonMessage.ActionEventList.ActionEvent.Builder;
/**
* @author syl 2017/04/19 14:00
*/
public class ActionEvent {
private static final ActionEvent defaultInstance;
private int bitField0_;
public static final int ACTIONTYPE_FIELD_NUMBER = 1;
private ActionType actionType_;
public static final int MILLIS_FIELD_NUMBER = 2;
private long millis_;
public static final int EXTRA_FIELD_NUMBER = 3;
private int extra_;
private byte memoizedIsInitialized = -1;
private int memoizedSerializedSize = -1;
private static final long serialVersionUID = 0L;
private String str;
public String getStr() {
return "actionType_:" + actionType_ + ",extra_:" + extra_ + ",millis_:"
+ millis_;
}
public void setStr(String str) {
this.str = str;
}
public boolean hasActionType() {
return (this.bitField0_ & 0x1) == 1;
}
public ActionType getActionType() {
return this.actionType_;
}
public boolean hasMillis() {
return (this.bitField0_ & 0x2) == 2;
}
public long getMillis() {
return this.millis_;
}
public boolean hasExtra() {
return (this.bitField0_ & 0x4) == 4;
}
public int getExtra() {
return this.extra_;
}
public ActionType getActionType_() {
return actionType_;
}
public void setActionType_(ActionType actionType_) {
this.actionType_ = actionType_;
}
public long getMillis_() {
return millis_;
}
public void setMillis_(long millis_) {
this.millis_ = millis_;
}
public int getExtra_() {
return extra_;
}
public void setExtra_(int extra_) {
this.extra_ = extra_;
}
private void initFields() {
this.actionType_ = ActionType.PRESS_DOWN;
this.millis_ = 0L;
this.extra_ = 0;
}
public final boolean isInitialized() {
byte isInitialized = this.memoizedIsInitialized;
if (isInitialized != -1)
return isInitialized == 1;
if (!hasActionType()) {
this.memoizedIsInitialized = 0;
return false;
}
if (!hasMillis()) {
this.memoizedIsInitialized = 0;
return false;
}
this.memoizedIsInitialized = 1;
return true;
}
static {
defaultInstance = new ActionEvent();
defaultInstance.initFields();
}
public static enum ActionType {
PRESS_DOWN(0, 0),
PRESS_UP(1, 1),
POINT_COORD_X(2, 2),
POINT_COORD_Y(3, 3);
public static final int PRESS_DOWN_VALUE = 0;
public static final int PRESS_UP_VALUE = 1;
public static final int POINT_COORD_X_VALUE = 2;
public static final int POINT_COORD_Y_VALUE = 3;
private static final ActionType[] VALUES;
private final int index;
private final int value;
public final int getNumber() {
return this.value;
}
public static ActionType valueOf(int value) {
switch (value) {
case 0:
return PRESS_DOWN;
case 1:
return PRESS_UP;
case 2:
return POINT_COORD_X;
case 3:
return POINT_COORD_Y;
}
return null;
}
private ActionType(int index, int value) {
this.index = index;
this.value = value;
}
static {
VALUES = values();
}
}
}