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/values/StaticMethodValue.java | |
| parent | 060ae04a695df6abac7445df3c5394b59da40f41 (diff) | |
Remove lombok
Diffstat (limited to 'src/main/java/org/zwobble/couscous/interpreter/values/StaticMethodValue.java')
| -rw-r--r-- | src/main/java/org/zwobble/couscous/interpreter/values/StaticMethodValue.java | 55 |
1 files changed, 43 insertions, 12 deletions
diff --git a/src/main/java/org/zwobble/couscous/interpreter/values/StaticMethodValue.java b/src/main/java/org/zwobble/couscous/interpreter/values/StaticMethodValue.java index 37f3c56..302582c 100644 --- a/src/main/java/org/zwobble/couscous/interpreter/values/StaticMethodValue.java +++ b/src/main/java/org/zwobble/couscous/interpreter/values/StaticMethodValue.java @@ -2,23 +2,54 @@ package org.zwobble.couscous.interpreter.values; import java.util.List; import java.util.function.BiFunction; - import org.zwobble.couscous.ast.TypeName; import org.zwobble.couscous.interpreter.PositionalArguments; import org.zwobble.couscous.interpreter.Environment; -import lombok.AccessLevel; -import lombok.Getter; -import lombok.Value; - -@Value -public class StaticMethodValue implements Callable { - List<TypeName> argumentTypes; - @Getter(value=AccessLevel.NONE) - BiFunction<Environment, PositionalArguments, InterpreterValue> apply; +public final class StaticMethodValue implements Callable { + private final List<TypeName> argumentTypes; + private final BiFunction<Environment, PositionalArguments, InterpreterValue> apply; public InterpreterValue apply(Environment environment, PositionalArguments arguments) { return apply.apply(environment, arguments); } - -} + + public StaticMethodValue(final List<TypeName> argumentTypes, final BiFunction<Environment, PositionalArguments, InterpreterValue> apply) { + this.argumentTypes = argumentTypes; + this.apply = apply; + } + + public List<TypeName> getArgumentTypes() { + return this.argumentTypes; + } + + @java.lang.Override + public boolean equals(final java.lang.Object o) { + if (o == this) return true; + if (!(o instanceof StaticMethodValue)) return false; + final StaticMethodValue other = (StaticMethodValue)o; + final java.lang.Object this$argumentTypes = this.getArgumentTypes(); + final java.lang.Object other$argumentTypes = other.getArgumentTypes(); + if (this$argumentTypes == null ? other$argumentTypes != null : !this$argumentTypes.equals(other$argumentTypes)) return false; + final java.lang.Object this$apply = this.apply; + final java.lang.Object other$apply = other.apply; + if (this$apply == null ? other$apply != null : !this$apply.equals(other$apply)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + final java.lang.Object $argumentTypes = this.getArgumentTypes(); + result = result * PRIME + ($argumentTypes == null ? 43 : $argumentTypes.hashCode()); + final java.lang.Object $apply = this.apply; + result = result * PRIME + ($apply == null ? 43 : $apply.hashCode()); + return result; + } + + @java.lang.Override + public java.lang.String toString() { + return "StaticMethodValue(argumentTypes=" + this.getArgumentTypes() + ", apply=" + this.apply + ")"; + } +}
\ No newline at end of file |
