@@ -44,18 +44,18 @@ public class Options implements Serializable
4444 private static final long serialVersionUID = 1L ;
4545
4646 /** a map of the options with the character key */
47- private final Map <String , Option > shortOpts = new LinkedHashMap <String , Option >();
47+ private final Map <String , Option > shortOpts = new LinkedHashMap <>();
4848
4949 /** a map of the options with the long key */
50- private final Map <String , Option > longOpts = new LinkedHashMap <String , Option >();
50+ private final Map <String , Option > longOpts = new LinkedHashMap <>();
5151
5252 /** a map of the required options */
5353 // N.B. This can contain either a String (addOption) or an OptionGroup (addOptionGroup)
5454 // TODO this seems wrong
55- private final List <Object > requiredOpts = new ArrayList <Object >();
55+ private final List <Object > requiredOpts = new ArrayList <>();
5656
5757 /** a map of the option groups */
58- private final Map <String , OptionGroup > optionGroups = new LinkedHashMap <String , OptionGroup >();
58+ private final Map <String , OptionGroup > optionGroups = new LinkedHashMap <>();
5959
6060 /**
6161 * Add the specified option group.
@@ -91,7 +91,7 @@ public Options addOptionGroup(final OptionGroup group)
9191 */
9292 Collection <OptionGroup > getOptionGroups ()
9393 {
94- return new HashSet <OptionGroup >(optionGroups .values ());
94+ return new HashSet <>(optionGroups .values ());
9595 }
9696
9797 /**
@@ -227,7 +227,7 @@ public Collection<Option> getOptions()
227227 */
228228 List <Option > helpOptions ()
229229 {
230- return new ArrayList <Option >(shortOpts .values ());
230+ return new ArrayList <>(shortOpts .values ());
231231 }
232232
233233 /**
@@ -273,7 +273,7 @@ public List<String> getMatchingOptions(String opt)
273273 {
274274 opt = Util .stripLeadingHyphens (opt );
275275
276- final List <String > matchingOpts = new ArrayList <String >();
276+ final List <String > matchingOpts = new ArrayList <>();
277277
278278 // for a perfect match return the single option only
279279 if (longOpts .keySet ().contains (opt ))
0 commit comments