it's nothing serious...

This commit is contained in:
Michał Michaluk
2017-12-15 22:06:21 +01:00
parent bf4172822d
commit 84b3f63c00
11 changed files with 49 additions and 19 deletions

View File

@@ -4,6 +4,8 @@ import lombok.Value;
@Value
public class Demand {
private static final Demand NONE = of(0);
long level;
Schema schema;
@@ -20,7 +22,10 @@ public class Demand {
}
public static Demand nothingDemanded() {
return of(0);
return NONE;
}
Demand nullIfNone() {
return NONE == this ? null : this;
}
}