mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
schemes ui: use Predicate instead of Function<*, Boolean>
This commit is contained in:
@@ -27,7 +27,7 @@ import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.util.Collection;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class SchemesCombo<T extends Scheme> {
|
||||
|
||||
@@ -160,9 +160,9 @@ public class SchemesCombo<T extends Scheme> {
|
||||
}
|
||||
}
|
||||
|
||||
private void addItems(@NotNull Collection<T> schemes, Function<T,Boolean> filter) {
|
||||
private void addItems(@NotNull Collection<T> schemes, Predicate<T> filter) {
|
||||
for (T scheme : schemes) {
|
||||
if (filter.apply(scheme)) {
|
||||
if (filter.test(scheme)) {
|
||||
myComboBoxModel.addElement(new MySchemeListItem<>(scheme));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user