@@ -31,13 +31,15 @@ public class OptionGroup implements Serializable {
3131 /** The serial version UID. */
3232 private static final long serialVersionUID = 1L ;
3333
34- /** Hold the options */
34+ /**
35+ * Maps options where keys are option name and values are the options.
36+ */
3537 private final Map <String , Option > optionMap = new LinkedHashMap <>();
3638
37- /** The name of the selected option */
39+ /** The name of the selected option. */
3840 private String selected ;
3941
40- /** Specified whether this group is required */
42+ /** Specified whether this group is required. */
4143 private boolean required ;
4244
4345 /**
@@ -50,12 +52,10 @@ public OptionGroup() {
5052 /**
5153 * Adds the given {@code Option} to this group.
5254 *
53- * @param option the option to add to this group
54- * @return this option group with the option added
55+ * @param option the option to add to this group.
56+ * @return this option group with the option added.
5557 */
5658 public OptionGroup addOption (final Option option ) {
57- // key - option name
58- // value - the option
5959 optionMap .put (option .getKey (), option );
6060 return this ;
6161 }
@@ -93,7 +93,7 @@ public String getSelected() {
9393 /**
9494 * Tests whether this option group is required.
9595 *
96- * @return whether this option group is required
96+ * @return whether this option group is required.
9797 */
9898 public boolean isRequired () {
9999 return required ;
@@ -123,7 +123,7 @@ public void setRequired(final boolean required) {
123123 * Sets the selected option of this group to {@code name}.
124124 *
125125 * If the selected option is deprecated <em>no warning is logged</em>.
126- * @param option the option that is selected
126+ * @param option the option that is selected.
127127 * @throws AlreadySelectedException if an option from this group has already been selected.
128128 */
129129 public void setSelected (final Option option ) throws AlreadySelectedException {
@@ -144,7 +144,7 @@ public void setSelected(final Option option) throws AlreadySelectedException {
144144 /**
145145 * Returns the stringified version of this OptionGroup.
146146 *
147- * @return the stringified representation of this group
147+ * @return the stringified representation of this group.
148148 */
149149 @ Override
150150 public String toString () {
0 commit comments