com.google.common.truth.extensions.proto.AutoValue_FieldScopeImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of truth-proto-extension Show documentation
Show all versions of truth-proto-extension Show documentation
An extension for the Truth test assertion framework supporting
Protocol Buffers.
The newest version!
package com.google.common.truth.extensions.proto;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import com.google.protobuf.Descriptors;
// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_FieldScopeImpl extends FieldScopeImpl {
private final FieldScopeLogic logic;
private final Function super Optional, String> usingCorrespondenceStringFunction;
AutoValue_FieldScopeImpl(
FieldScopeLogic logic,
Function super Optional, String> usingCorrespondenceStringFunction) {
if (logic == null) {
throw new NullPointerException("Null logic");
}
this.logic = logic;
if (usingCorrespondenceStringFunction == null) {
throw new NullPointerException("Null usingCorrespondenceStringFunction");
}
this.usingCorrespondenceStringFunction = usingCorrespondenceStringFunction;
}
@Override
FieldScopeLogic logic() {
return logic;
}
@Override
Function super Optional, String> usingCorrespondenceStringFunction() {
return usingCorrespondenceStringFunction;
}
@Override
public String toString() {
return "FieldScopeImpl{"
+ "logic=" + logic + ", "
+ "usingCorrespondenceStringFunction=" + usingCorrespondenceStringFunction
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof FieldScopeImpl) {
FieldScopeImpl that = (FieldScopeImpl) o;
return this.logic.equals(that.logic())
&& this.usingCorrespondenceStringFunction.equals(that.usingCorrespondenceStringFunction());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= logic.hashCode();
h$ *= 1000003;
h$ ^= usingCorrespondenceStringFunction.hashCode();
return h$;
}
}