From d2af58b0f68ebfbba2be7e7679efec6c8c0af12f Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 9 Feb 2017 11:50:31 -0500 Subject: Update --- BJC-Utils2/src/main/java/bjc/utils/gui/SimpleJList.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'BJC-Utils2/src/main/java/bjc/utils/gui/SimpleJList.java') diff --git a/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleJList.java b/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleJList.java index 4db5027..136c662 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleJList.java +++ b/BJC-Utils2/src/main/java/bjc/utils/gui/SimpleJList.java @@ -17,16 +17,16 @@ public class SimpleJList { * @param * The type of data in the JList * - * @param listSource + * @param source * The list to populate the JList with. * @return A JList populated with the elements from ls. */ - public static JList buildFromList(Iterable listSource) { - if (listSource == null) { + public static JList buildFromList(Iterable source) { + if (source == null) { throw new NullPointerException("Source must not be null"); } - return new JList<>(buildModel(listSource)); + return new JList<>(buildModel(source)); } /** @@ -35,18 +35,18 @@ public class SimpleJList { * @param * The type of data in the list model * - * @param listSource + * @param source * The list to fill the list model from. * @return A list model populated with the elements from ls. */ - public static ListModel buildModel(Iterable listSource) { - if (listSource == null) { + public static ListModel buildModel(Iterable source) { + if (source == null) { throw new NullPointerException("Source must not be null"); } DefaultListModel defaultModel = new DefaultListModel<>(); - listSource.forEach(defaultModel::addElement); + source.forEach(defaultModel::addElement); return defaultModel; } -- cgit v1.2.3