mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-28 04:37:32 +07:00
[extract method] IDEA-251837 fix texts GitOrigin-RevId: 37da2e7e8f83a4d85a87c644788a66ce6ea1e05f
63 lines
1.7 KiB
Java
63 lines
1.7 KiB
Java
import org.jetbrains.annotations.NotNull;
|
|
|
|
class Test {
|
|
|
|
public static void main(String[] args) {
|
|
}
|
|
|
|
private static void test(Object o) {
|
|
for (int i = 0; i < 10; i++) {
|
|
System.out.println(1);
|
|
System.out.println(2);
|
|
System.out.println(3);
|
|
System.out.println(4);
|
|
System.out.println(5);
|
|
System.out.println(6);
|
|
System.out.println(7);
|
|
System.out.println(8);
|
|
System.out.println(9);
|
|
System.out.println(10);
|
|
|
|
String s = getString<caret>(o);
|
|
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
}
|
|
}
|
|
|
|
private static @NotNull String getString(Object o) {
|
|
String s;
|
|
if (o instanceof String s2 && s2.length() == 1) {
|
|
s = "1";
|
|
} else if (o instanceof String s2 && s2.length() == 2) {
|
|
s = "2";
|
|
} else if (o instanceof String s2 && s2.length() == 3) {
|
|
s = "3";
|
|
} else if (o instanceof String s2 && s2.length() == 4) {
|
|
s = "4";
|
|
} else if (o instanceof String s2 && s2.length() == 5) {
|
|
s = "5";
|
|
} else if (o instanceof String s2 && s2.length() == 6) {
|
|
s = "6";
|
|
} else if (o instanceof String s2 && s2.length() == 7) {
|
|
s = "7";
|
|
} else if (o instanceof String s2 && s2.length() == 8) {
|
|
s = "8";
|
|
} else {
|
|
s = "null";
|
|
}
|
|
return s;
|
|
}
|
|
}
|