Changeset 14662 in josm for trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesMembershipChoiceDialog.java
- Timestamp:
- 2019-01-07T19:46:32+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesMembershipChoiceDialog.java
r14654 r14662 7 7 import java.util.Collection; 8 8 import java.util.Objects; 9 import java.util.Optional; 9 10 10 11 import javax.swing.AbstractButton; … … 113 114 /** 114 115 * Returns the tags choice. 115 * @return the tags choice (can be null)116 * @return the tags choice 116 117 */ 117 public ExistingBothNew getTags() { 118 return tags.getSelected();118 public Optional<ExistingBothNew> getTags() { 119 return Optional.ofNullable(tags).map(ExistingBothNewChoice::getSelected); 119 120 } 120 121 121 122 /** 122 123 * Returns the memberships choice. 123 * @return the memberships choice (can be null)124 * @return the memberships choice 124 125 */ 125 public ExistingBothNew getMemberships() { 126 return memberships .getSelected();126 public Optional<ExistingBothNew> getMemberships() { 127 return Optional.ofNullable(memberships).map(ExistingBothNewChoice::getSelected); 127 128 } 128 129
Note:
See TracChangeset
for help on using the changeset viewer.
