This repository was archived by the owner on Aug 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
src/main/java/ir/xenoncommunity Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 97
97
</plugin >
98
98
</plugins >
99
99
</pluginManagement >
100
+ <plugins >
101
+ <plugin >
102
+ <groupId >org.apache.maven.plugins</groupId >
103
+ <artifactId >maven-compiler-plugin</artifactId >
104
+ <configuration >
105
+ <source >17</source >
106
+ <target >17</target >
107
+ <compilerArgs >--enable-preview</compilerArgs >
108
+ </configuration >
109
+ </plugin >
110
+ </plugins >
100
111
</build >
101
112
</project >
Original file line number Diff line number Diff line change @@ -9,5 +9,9 @@ public void run(){
9
9
System .out .println ((String ) ArgumentHandler .getArg ("-kir" ));
10
10
System .out .println ((int ) ArgumentHandler .getArg ("-kos" ));
11
11
System .out .println ((boolean ) ArgumentHandler .getArg ("-kiramtot" ));
12
+ System .out .println ((boolean ) ArgumentHandler .getArg ("-kosam" ));
13
+ System .out .println ((boolean ) ArgumentHandler .getArg ("-kooooos" ));
14
+ System .out .println ((boolean ) ArgumentHandler .getArg ("-rot" ));
15
+
12
16
}
13
17
}
Original file line number Diff line number Diff line change 3
3
import ir .xenoncommunity .Main ;
4
4
import lombok .val ;
5
5
import lombok .experimental .UtilityClass ;
6
- import lombok .var ;
7
6
8
7
@ UtilityClass
9
8
public class ArgumentHandler {
@@ -12,7 +11,7 @@ public <T> T getArg(final String argIn) {
12
11
if (Main .args [index ].equals (argIn )) {
13
12
var temp = (index + 1 < Main .args .length ) ? (Main .args [index + 1 ]) : ("" );
14
13
if (temp .startsWith ("-" ) ) {
15
- return (T ) Boolean .valueOf (Boolean . parseBoolean ( Main . args [ index ]) );
14
+ return (T ) Boolean .valueOf (true );
16
15
}else {
17
16
switch (temp ){
18
17
case "" :
You can’t perform that action at this time.
0 commit comments