infrastructure improvements
This commit is contained in:
@@ -11,10 +11,6 @@ public class Demand {
|
||||
AtDayStart, Every3hours, TillDayEnd, Twice
|
||||
}
|
||||
|
||||
public static Demand nothingDemanded() {
|
||||
return of(0);
|
||||
}
|
||||
|
||||
public static Demand of(long level) {
|
||||
return new Demand(level, Schema.TillDayEnd);
|
||||
}
|
||||
@@ -22,4 +18,14 @@ public class Demand {
|
||||
public static Demand of(long level, Schema schema) {
|
||||
return new Demand(level, schema);
|
||||
}
|
||||
|
||||
public static Demand nothingDemanded() {
|
||||
return of(0);
|
||||
}
|
||||
|
||||
public static Demand ofNullable(Long level, Schema schema) {
|
||||
return level == null || schema == null
|
||||
? nothingDemanded()
|
||||
: of(level, schema);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user