incremental update

This commit is contained in:
Jonathan Shook
2024-05-10 16:39:06 -05:00
parent 8b332fbed8
commit d4462bb8f3
9 changed files with 233 additions and 8 deletions

View File

@@ -178,7 +178,7 @@ public class NBConfiguration {
}
}
} else {
throw new NBConfigError("Parameter was not found for " + Arrays.toString(names) + ".");
throw new NBConfigError("Parameter definition was not found for " + Arrays.toString(names) + ".");
}
}
if (o == null) {

View File

@@ -136,6 +136,9 @@ public class Param<T> {
* @return
*/
public static <V> Param<V> defaultTo(String name, V defaultValue) {
if (defaultValue instanceof Class clazz) {
throw new RuntimeException("This is not a supported type.");
}
return new Param<V>(List.of(name), (Class<V>) defaultValue.getClass(), null, true, defaultValue, null);
}