mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-79726 (Grails: 'Create action' intention should create action in bottom of controller.)
This commit is contained in:
@@ -677,6 +677,17 @@ public class ContainerUtil {
|
||||
return items == null || items.isEmpty() ? def : items.iterator().next();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static <T> T getLastItem(final Collection<T> items) {
|
||||
Iterator<T> itr = items.iterator();
|
||||
T res = null;
|
||||
while (itr.hasNext()) {
|
||||
res = itr.next();
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static <T> Collection<T> subtract(@NotNull Collection<T> from, @NotNull Collection<T> what) {
|
||||
final HashSet<T> set = new HashSet<T>(from);
|
||||
|
||||
Reference in New Issue
Block a user