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> {
|
public interface ValueCollectionSetting<T> extends HasValueSetting<T>, CollectionSetting<T> {
|
||||||
void setDefaultValues(Iterable<T> defaultValues);
|
void setDefaultValues(Iterable<T> defaultValues);
|
||||||
|
Iterable<T> getDefaultValues();
|
||||||
boolean isValuesEmpty();
|
boolean isValuesEmpty();
|
||||||
}
|
}
|
||||||
@@ -6,4 +6,6 @@ public interface ValueSetting<T> extends HasValueSetting<T> {
|
|||||||
void setValue(T value);
|
void setValue(T value);
|
||||||
|
|
||||||
void setDefaultValue(T defaultValue);
|
void setDefaultValue(T defaultValue);
|
||||||
|
|
||||||
|
T getDefaultValue();
|
||||||
}
|
}
|
||||||
+5
@@ -91,6 +91,11 @@ public abstract class AbstractValueCollectionSetting<T, C extends Collection<Val
|
|||||||
resetToDefault();
|
resetToDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Iterable<T> getDefaultValues() {
|
||||||
|
return Collections.unmodifiableCollection(this.defaultValues);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|||||||
+5
@@ -58,6 +58,11 @@ public abstract class AbstractValueSetting<T> extends AbstractHasValueSetting<T>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public T getDefaultValue() {
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "" + getValue();
|
return "" + getValue();
|
||||||
|
|||||||
Reference in new issue
Block a user