20: Add new AlarmConfiguration class
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.r35157.jupiterperpsalarm.impl.ref;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public record AlarmConfiguration(
|
||||
List<PriceAlarmDefinition> definitions,
|
||||
Map<String, String> variables
|
||||
) {
|
||||
public AlarmConfiguration {
|
||||
Objects.requireNonNull(definitions, "definitions");
|
||||
Objects.requireNonNull(variables, "variables");
|
||||
|
||||
definitions = List.copyOf(definitions);
|
||||
variables = Map.copyOf(variables);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user