diff options
| author | Ben Culkin <scorpress@gmail.com> | 2020-04-13 18:40:41 -0400 |
|---|---|---|
| committer | Ben Culkin <scorpress@gmail.com> | 2020-04-13 18:40:41 -0400 |
| commit | d4ca769e542b2489b1e23cfcbdc3a0b7275b87cd (patch) | |
| tree | 1653a7399f97fb0c63ce62e3f60fd830d5c37f70 /base/src/main/java/bjc/utils/gui/SimpleJList.java | |
| parent | 2ac2e31a56ae59ee582e43a90c3495f86dd9ee7a (diff) | |
Cleanup pass
Cleanup pass to uniformize things
Diffstat (limited to 'base/src/main/java/bjc/utils/gui/SimpleJList.java')
| -rw-r--r-- | base/src/main/java/bjc/utils/gui/SimpleJList.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/base/src/main/java/bjc/utils/gui/SimpleJList.java b/base/src/main/java/bjc/utils/gui/SimpleJList.java index 31c995c..ca8eeb9 100644 --- a/base/src/main/java/bjc/utils/gui/SimpleJList.java +++ b/base/src/main/java/bjc/utils/gui/SimpleJList.java @@ -15,14 +15,15 @@ public class SimpleJList { * Create a new JList from a given list. * * @param <E> - * The type of data in the JList + * The type of data in the JList * * @param source - * The list to populate the JList with. + * The list to populate the JList with. * @return A JList populated with the elements from ls. */ public static <E> JList<E> buildFromList(final Iterable<E> source) { - if(source == null) throw new NullPointerException("Source must not be null"); + if (source == null) + throw new NullPointerException("Source must not be null"); return new JList<>(buildModel(source)); } @@ -31,14 +32,15 @@ public class SimpleJList { * Create a new list model from a given list. * * @param <E> - * The type of data in the list model + * The type of data in the list model * * @param source - * The list to fill the list model from. + * The list to fill the list model from. * @return A list model populated with the elements from ls. */ public static <E> ListModel<E> buildModel(final Iterable<E> source) { - if(source == null) throw new NullPointerException("Source must not be null"); + if (source == null) + throw new NullPointerException("Source must not be null"); final DefaultListModel<E> defaultModel = new DefaultListModel<>(); |
