diff options
author | Leif Åstrand <legioth@gmail.com> | 2016-12-20 17:50:32 +0200 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2016-12-20 17:50:32 +0200 |
commit | 95d016c08569f74a2c76eac40c4f5656bb773951 (patch) | |
tree | 340977988748756ee4ace27860dc00b3358519ae /server/src/main/java/com/vaadin/ui/ComboBox.java | |
parent | 1407b8ddaea9a8aace0973864ad9ce093e20a566 (diff) | |
download | vaadin-framework-95d016c08569f74a2c76eac40c4f5656bb773951.tar.gz vaadin-framework-95d016c08569f74a2c76eac40c4f5656bb773951.zip |
Global java code cleanup using Eclipse Neon.1
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/ComboBox.java')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/ComboBox.java | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/server/src/main/java/com/vaadin/ui/ComboBox.java b/server/src/main/java/com/vaadin/ui/ComboBox.java index 2df887016d..a15dd6d96c 100644 --- a/server/src/main/java/com/vaadin/ui/ComboBox.java +++ b/server/src/main/java/com/vaadin/ui/ComboBox.java @@ -23,11 +23,6 @@ import java.util.Map; import java.util.Objects; import java.util.Set; -import com.vaadin.server.KeyMapper; -import com.vaadin.server.Resource; -import com.vaadin.server.ResourceReference; -import com.vaadin.server.SerializableBiPredicate; -import com.vaadin.server.SerializableConsumer; import org.jsoup.nodes.Element; import com.vaadin.data.HasValue; @@ -41,6 +36,11 @@ import com.vaadin.event.FieldEvents.BlurListener; import com.vaadin.event.FieldEvents.FocusAndBlurServerRpcDecorator; import com.vaadin.event.FieldEvents.FocusEvent; import com.vaadin.event.FieldEvents.FocusListener; +import com.vaadin.server.KeyMapper; +import com.vaadin.server.Resource; +import com.vaadin.server.ResourceReference; +import com.vaadin.server.SerializableBiPredicate; +import com.vaadin.server.SerializableConsumer; import com.vaadin.shared.Registration; import com.vaadin.shared.data.DataCommunicatorConstants; import com.vaadin.shared.ui.combobox.ComboBoxConstants; @@ -238,13 +238,12 @@ public class ComboBox<T> extends AbstractSingleSelect<T> * conversion is performed before the comparison. * * @param captionFilter - * filter to check if an item is shown when user typed some text into the ComboBox + * filter to check if an item is shown when user typed some text + * into the ComboBox * @param items * the data items to display */ - public void setItems( - CaptionFilter captionFilter, - Collection<T> items) { + public void setItems(CaptionFilter captionFilter, Collection<T> items) { DataProvider<T, String> provider = DataProvider.create(items) .convertFilter(filterText -> item -> captionFilter.test( getItemCaptionGenerator().apply(item), filterText)); @@ -259,12 +258,12 @@ public class ComboBox<T> extends AbstractSingleSelect<T> * conversion is performed before the comparison. * * @param captionFilter - * filter to check if an item is shown when user typed some text into the ComboBox + * filter to check if an item is shown when user typed some text + * into the ComboBox * @param items * the data items to display */ - public void setItems( - CaptionFilter captionFilter, + public void setItems(CaptionFilter captionFilter, @SuppressWarnings("unchecked") T... items) { DataProvider<T, String> provider = DataProvider.create(items) .convertFilter(filterText -> item -> captionFilter.test( @@ -555,8 +554,8 @@ public class ComboBox<T> extends AbstractSingleSelect<T> public Registration addValueChangeListener( HasValue.ValueChangeListener<T> listener) { return addSelectionListener(event -> { - listener.valueChange(new ValueChangeEvent<>(event.getComponent(), this, - event.isUserOriginated())); + listener.valueChange(new ValueChangeEvent<>(event.getComponent(), + this, event.isUserOriginated())); }); } @@ -676,20 +675,23 @@ public class ComboBox<T> extends AbstractSingleSelect<T> } /** - * Predicate to check {@link ComboBox} item captions against user typed strings. + * Predicate to check {@link ComboBox} item captions against user typed + * strings. * * @see #setItems(CaptionFilter, Collection) * @see #setItems(CaptionFilter, Object[]) */ @FunctionalInterface - public interface CaptionFilter extends SerializableBiPredicate<String, String> { + public interface CaptionFilter + extends SerializableBiPredicate<String, String> { /** * Check item caption against entered text * * @param itemCaption * @param filterText - * @return {@code true} if item passes the filter and should be listed, {@code false} otherwise + * @return {@code true} if item passes the filter and should be listed, + * {@code false} otherwise */ @Override public boolean test(String itemCaption, String filterText); |