-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPresident.java
More file actions
347 lines (270 loc) · 9.54 KB
/
Copy pathPresident.java
File metadata and controls
347 lines (270 loc) · 9.54 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package potus;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
public class President {
private String ID;
private String Name;
private String Name_Full;
private String Symbol;
private String VicePresident_Name_1;
private String VicePresident_Name_2;
private String VicePresident_Name_3;
private String VicePresident_Name_Full_1;
private String VicePresident_Name_Full_2;
private String VicePresident_Name_Full_3;
private String VicePresident_Symbal_1;
private String VicePresident_Symbal_2;
private String VicePresident_Symbal_3;
private String VicePresident_From_1;
private String VicePresident_From_2;
private String VicePresident_From_3;
private String VicePresident_To_1;
private String VicePresident_To_2;
private String VicePresident_To_3;
private String From;
private String To;
public President() {
ID = "N/A";
Name = "N/A";
Name_Full = "N/A";
Symbol = "N/A";
VicePresident_Name_1 = "N/A";
VicePresident_Name_2 = "N/A";
VicePresident_Name_3 = "N/A";
VicePresident_Name_Full_1 = "N/A";
VicePresident_Name_Full_2 = "N/A";
VicePresident_Name_Full_3 = "N/A";
VicePresident_Symbal_1 = "N/A";
VicePresident_Symbal_2 = "N/A";
VicePresident_Symbal_3 = "N/A";
VicePresident_From_1 = "N/A";
VicePresident_From_2 = "N/A";
VicePresident_From_3 = "N/A";
VicePresident_To_1 = "N/A";
VicePresident_To_2 = "N/A";
VicePresident_To_3 = "N/A";
From = "N/A";
To = "N/A";
}
public boolean hasVicePresident_1(){
return !getVicePresident_Name_1().equals("N/A");
}
public boolean hasVicePresident_2(){
return !getVicePresident_Name_2().equals("N/A");
}
public boolean hasVicePresident_3(){
return !getVicePresident_Name_2().equals("N/A");
}
public boolean verifyEntry(String entry){
boolean bool = true;
return bool;
}
public String getID() {
return ID;
}
public void setID(String ID) {
this.ID = ID;
}
public String getName() {
return Name;
}
public void setName(String Name) {
this.Name = Name;
}
public String getFrom() {
return From;
}
public void setFrom(String From) {
this.From = From;
}
public String getTo() {
return To;
}
public void setTo(String To) {
this.To = To;
}
public String getFlag_1() {
return getID() + "_1.jpg";
}
public String getFlag_2() {
return getID() + "_2.jpg";
}
public String getName_Full() {
return Name_Full;
}
public void setName_Full(String Name_Full) {
this.Name_Full = Name_Full;
}
public String getSymbol() {
return Symbol;
}
public void setSymbol(String Symbol) {
this.Symbol = Symbol;
}
public String getVicePresident_Name_1() {
return VicePresident_Name_1;
}
public void setVicePresident_Name_1(String VicePresident_Name_1) {
this.VicePresident_Name_1 = VicePresident_Name_1;
}
public String getVicePresident_Name_2() {
return VicePresident_Name_2;
}
public void setVicePresident_Name_2(String VicePresident_Name_2) {
this.VicePresident_Name_2 = VicePresident_Name_2;
}
public String getVicePresident_Name_3() {
return VicePresident_Name_3;
}
public void setVicePresident_Name_3(String VicePresident_Name_3) {
this.VicePresident_Name_3 = VicePresident_Name_3;
}
public String getVicePresident_Name_Full_1() {
return VicePresident_Name_Full_1;
}
public void setVicePresident_Name_Full_1(String VicePresident_Name_Full_1) {
this.VicePresident_Name_Full_1 = VicePresident_Name_Full_1;
}
public String getVicePresident_Name_Full_2() {
return VicePresident_Name_Full_2;
}
public void setVicePresident_Name_Full_2(String VicePresident_Name_Full_2) {
this.VicePresident_Name_Full_2 = VicePresident_Name_Full_2;
}
public String getVicePresident_Name_Full_3() {
return VicePresident_Name_Full_3;
}
public void setVicePresident_Name_Full_3(String VicePresident_Name_Full_3) {
this.VicePresident_Name_Full_3 = VicePresident_Name_Full_3;
}
public String getVicePresident_Symbal_1() {
return VicePresident_Symbal_1;
}
public void setVicePresident_Symbal_1(String VicePresident_Symbal_1) {
this.VicePresident_Symbal_1 = VicePresident_Symbal_1;
}
public String getVicePresident_Symbal_2() {
return VicePresident_Symbal_2;
}
public void setVicePresident_Symbal_2(String VicePresident_Symbal_2) {
this.VicePresident_Symbal_2 = VicePresident_Symbal_2;
}
public String getVicePresident_Symbal_3() {
return VicePresident_Symbal_3;
}
public void setVicePresident_Symbal_3(String VicePresident_Symbal_3) {
this.VicePresident_Symbal_3 = VicePresident_Symbal_3;
}
public String getVicePresident_From_1() {
return VicePresident_From_1;
}
public void setVicePresident_From_1(String VicePresident_From_1) {
this.VicePresident_From_1 = VicePresident_From_1;
}
public String getVicePresident_From_2() {
return VicePresident_From_2;
}
public void setVicePresident_From_2(String VicePresident_From_2) {
this.VicePresident_From_2 = VicePresident_From_2;
}
public String getVicePresident_From_3() {
return VicePresident_From_3;
}
public void setVicePresident_From_3(String VicePresident_From_3) {
this.VicePresident_From_3 = VicePresident_From_3;
}
public String getVicePresident_To_1() {
return VicePresident_To_1;
}
public void setVicePresident_To_1(String VicePresident_To_1) {
this.VicePresident_To_1 = VicePresident_To_1;
}
public String getVicePresident_To_2() {
return VicePresident_To_2;
}
public void setVicePresident_To_2(String VicePresident_To_2) {
this.VicePresident_To_2 = VicePresident_To_2;
}
public String getVicePresident_To_3() {
return VicePresident_To_3;
}
public void setVicePresident_To_3(String VicePresident_To_3) {
this.VicePresident_To_3 = VicePresident_To_3;
}
public String GetCompareTo_PresidentName() {
return getName() + getFrom() + getTo();
}
public String GetCompareTo_PresidentFullName() {
return getName_Full() + getFrom() + getTo();
}
public String GetCompareTo_VicePresidentName_1() {
return getVicePresident_Name_1() + " " + getVicePresident_From_1() + " " + getVicePresident_To_1();
}
public String getEntry(boolean date){
if(date){
return getName_Full() + " " + getFrom() + " " + getTo();
}else{
return getName_Full();
}
}
public ArrayList<String> getStringEntries(boolean date){
ArrayList<String> temp = new ArrayList<>();
temp.addAll(Arrays.asList(getName_Full().toUpperCase().split(" ")));
temp.addAll(Arrays.asList(getName().toUpperCase().split(" ")));
if(date){
temp.add(getFrom());
temp.add(getTo());
temp.add(getFrom() + "-" + getTo().substring(2));
}
return temp;
}
public String getNameFullDate(){
return getName() + " " + getFrom() + " " + getTo();
}
//Keep
public String getNameDate(){
return getName() + " " + getFrom() + "-" + getTo().substring(2, 4);
}
public String getFullNameDate(){
return getName_Full() + getFrom() + "-" + getTo().substring(2, 4);
}
public boolean Verify(String[] entry, boolean date){
ArrayList<String> wordList = new ArrayList<>();
Collections.addAll(wordList, entry);
System.out.println("Entry: " + wordList);
System.out.println("T: " + getStringEntries(true));
boolean tempBool = true;
if(date){
if(!(wordList.contains(getFrom()) && wordList.contains(getTo())) || wordList.contains("-" + getTo().substring(2, 4))){
tempBool = false;
}
}
for(int i = 0; i < entry.length; i++){
if(getStringEntries(date).contains(entry[i])){
System.out.println("x: " + entry[i]);
continue;
}else{
System.out.println("Error: " + entry[i]);
tempBool = false;
}
}
return tempBool;
}
/*public String GetCompareTo_VicePresidentName_2(){
}
public String GetCompareTo_VicePresidentName_3(){
}
public String GetCompareTo_VicePresidentFullName_1(){
return
}
public String GetCompareTo_VicePresidentFullName_2(){
}
public String GetCompareTo_VicePresidentFullName_3(){
}*/
}