Rev | Line | |
---|
[12881] | 1 | // License: GPL. For details, see LICENSE file.
|
---|
| 2 | package org.openstreetmap.josm.spi.preferences;
|
---|
| 3 |
|
---|
| 4 | /**
|
---|
| 5 | * Default implementation of the {@link PreferenceChangeEvent} interface.
|
---|
[12882] | 6 | * @since 12881
|
---|
[12881] | 7 | */
|
---|
| 8 | public class DefaultPreferenceChangeEvent implements PreferenceChangeEvent {
|
---|
| 9 |
|
---|
| 10 | private final String key;
|
---|
| 11 | private final Setting<?> oldValue;
|
---|
| 12 | private final Setting<?> newValue;
|
---|
| 13 |
|
---|
| 14 | public DefaultPreferenceChangeEvent(String key, Setting<?> oldValue, Setting<?> newValue) {
|
---|
| 15 | this.key = key;
|
---|
| 16 | this.oldValue = oldValue;
|
---|
| 17 | this.newValue = newValue;
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | @Override
|
---|
| 21 | public String getKey() {
|
---|
| 22 | return key;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | @Override
|
---|
| 26 | public Setting<?> getOldValue() {
|
---|
| 27 | return oldValue;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | @Override
|
---|
| 31 | public Setting<?> getNewValue() {
|
---|
| 32 | return newValue;
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.