diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-10-25 19:18:09 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-10-25 19:34:44 +0000 |
| commit | 368f2dd010defaf5f4b6deb70f45285cee8f244d (patch) | |
| tree | 55494f85341f23dd1e588fa070ef863ef7cfdef5 /src/main/java/org/zwobble/couscous/interpreter/ConditionMustBeBoolean.java | |
| parent | 060ae04a695df6abac7445df3c5394b59da40f41 (diff) | |
Remove lombok
Diffstat (limited to 'src/main/java/org/zwobble/couscous/interpreter/ConditionMustBeBoolean.java')
| -rw-r--r-- | src/main/java/org/zwobble/couscous/interpreter/ConditionMustBeBoolean.java | 48 |
1 files changed, 40 insertions, 8 deletions
diff --git a/src/main/java/org/zwobble/couscous/interpreter/ConditionMustBeBoolean.java b/src/main/java/org/zwobble/couscous/interpreter/ConditionMustBeBoolean.java index 7f2e901..b9cf32a 100644 --- a/src/main/java/org/zwobble/couscous/interpreter/ConditionMustBeBoolean.java +++ b/src/main/java/org/zwobble/couscous/interpreter/ConditionMustBeBoolean.java @@ -2,13 +2,45 @@ package org.zwobble.couscous.interpreter; import org.zwobble.couscous.interpreter.values.InterpreterValue; -import lombok.EqualsAndHashCode; -import lombok.Value; - -@Value -@EqualsAndHashCode(callSuper=false) -public class ConditionMustBeBoolean extends InterpreterException { +public final class ConditionMustBeBoolean extends InterpreterException { private static final long serialVersionUID = 1L; + private final InterpreterValue actual; + + public ConditionMustBeBoolean(final InterpreterValue actual) { + this.actual = actual; + } + + public InterpreterValue getActual() { + return this.actual; + } + + @java.lang.Override + public java.lang.String toString() { + return "ConditionMustBeBoolean(actual=" + this.getActual() + ")"; + } + + @java.lang.Override + public boolean equals(final java.lang.Object o) { + if (o == this) return true; + if (!(o instanceof ConditionMustBeBoolean)) return false; + final ConditionMustBeBoolean other = (ConditionMustBeBoolean)o; + if (!other.canEqual((java.lang.Object)this)) return false; + final java.lang.Object this$actual = this.getActual(); + final java.lang.Object other$actual = other.getActual(); + if (this$actual == null ? other$actual != null : !this$actual.equals(other$actual)) return false; + return true; + } + + protected boolean canEqual(final java.lang.Object other) { + return other instanceof ConditionMustBeBoolean; + } - InterpreterValue actual; -} + @java.lang.Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + final java.lang.Object $actual = this.getActual(); + result = result * PRIME + ($actual == null ? 43 : $actual.hashCode()); + return result; + } +}
\ No newline at end of file |
