
com.undefinedlabs.scope.SpanReference Maven / Gradle / Ivy
package com.undefinedlabs.scope;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
public class SpanReference {
private final SpanContext spanContext;
private final String type;
public SpanReference(final SpanContext spanContext, final String type) {
this.spanContext = spanContext;
this.type = type;
}
public SpanContext getSpanContext() {
return spanContext;
}
public String getType() {
return type;
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final SpanReference that = (SpanReference) o;
return new EqualsBuilder()
.append(spanContext, that.spanContext)
.append(type, that.type)
.isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(spanContext).append(type).toHashCode();
}
@Override
public String toString() {
return new ToStringBuilder(this)
.append("spanContext", spanContext)
.append("type", type)
.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy