mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-28 14:57:12 +00:00
Implemented getDefaultValue for several Setting types
This commit is contained in:
1 parent
375b5eea4d
commit
a19f12fbda
4 files changed
+13
No files matched your search
+1
@@ -3,5 +3,6 @@ package com.sap.sse.common.settings.generic;
|
||||
|
||||
public interface ValueCollectionSetting<T> extends HasValueSetting<T>, CollectionSetting<T> {
|
||||
void setDefaultValues(Iterable<T> defaultValues);
|
||||
Iterable<T> getDefaultValues();
|
||||
boolean isValuesEmpty();
|
||||
}
|
||||
@@ -6,4 +6,6 @@ public interface ValueSetting<T> extends HasValueSetting<T> {
|
||||
void setValue(T value);
|
||||
|
||||
void setDefaultValue(T defaultValue);
|
||||
|
||||
T getDefaultValue();
|
||||
}
|
||||
+5
@@ -91,6 +91,11 @@ public abstract class AbstractValueCollectionSetting<T, C extends Collection<Val
|
||||
resetToDefault();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<T> getDefaultValues() {
|
||||
return Collections.unmodifiableCollection(this.defaultValues);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
+5
@@ -58,6 +58,11 @@ public abstract class AbstractValueSetting<T> extends AbstractHasValueSetting<T>
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public T getDefaultValue() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "" + getValue();
|
||||
|
||||
Reference in new issue
Block a user