Consider the following:
package p
class A {
public static boolean isSomething(String s) {
...
}
}
class B {
public static boolean isSomething(Iterable i) {
...
}
}
import static p.A.isSomething
import static p.B.isSomething
String s = ...
Iterable i = ...
isSomething(s)
isSomething(i)
Organize Imports (Ctrl+Shift+O) drops the two imports. This is a common use case when using something like Apache Commons which adds similar named methods for Strings, Collections, etc.
Consider the following:
Organize Imports (Ctrl+Shift+O) drops the two imports. This is a common use case when using something like Apache Commons which adds similar named methods for Strings, Collections, etc.