Move getExample implementation to BooleanFlag

This commit is contained in:
Alexander Söderberg 2020-02-16 15:59:56 +01:00
parent 080e3d0788
commit 4dce805978
5 changed files with 4 additions and 16 deletions

View File

@ -12,10 +12,6 @@ public class DenyExitFlag extends BooleanFlag<DenyExitFlag> {
super(value, Captions.FLAG_DESCRIPTION_DENY_EXIT);
}
@Override public String getExample() {
return "true";
}
@Override protected DenyExitFlag flagOf(@NotNull Boolean value) {
return new DenyExitFlag(value);
}

View File

@ -13,10 +13,6 @@ public class ExplosionFlag extends BooleanFlag<ExplosionFlag> {
super(value, Captions.FLAG_DESCRIPTION_EXPLOSION);
}
@Override public String getExample() {
return "true";
}
@Override protected ExplosionFlag flagOf(@NotNull Boolean value) {
return value ? EXPLOSION_TRUE : EXPLOSION_FALSE;
}

View File

@ -12,10 +12,6 @@ public class FlightFlag extends BooleanFlag<FlightFlag> {
super(value, Captions.FLAG_DESCRIPTION_FLIGHT);
}
@Override public String getExample() {
return "true";
}
@Override protected FlightFlag flagOf(@NotNull Boolean value) {
return new FlightFlag(value);
}

View File

@ -12,10 +12,6 @@ public class UntrustedVisitFlag extends BooleanFlag<UntrustedVisitFlag> {
super(value, Captions.FLAG_DESCRIPTION_UNTRUSTED);
}
@Override public String getExample() {
return "";
}
@Override protected UntrustedVisitFlag flagOf(@NotNull Boolean value) {
return new UntrustedVisitFlag(value);
}

View File

@ -49,6 +49,10 @@ public abstract class BooleanFlag<F extends PlotFlag<Boolean, F>> extends PlotFl
return this.flagOf(getValue() || newValue);
}
@Override public String getExample() {
return "true";
}
@Override public String toString() {
return this.getValue().toString();
}