@Test public void testEquals() { assertThat(first).isEqualTo(first); assertThat(first).isNotEqualTo(second); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof SpanContext)) { return false; } SpanContext that = (SpanContext)obj; return Objects.equals(traceId, that.traceId) && Objects.equals(spanId, that.spanId) && Objects.equals(traceOptions, that.traceOptions); }
SpanContext { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof SpanContext)) { return false; } SpanContext that = (SpanContext)obj; return Objects.equals(traceId, that.traceId) && Objects.equals(spanId, that.spanId) && Objects.equals(traceOptions, that.traceOptions); } }
SpanContext { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof SpanContext)) { return false; } SpanContext that = (SpanContext)obj; return Objects.equals(traceId, that.traceId) && Objects.equals(spanId, that.spanId) && Objects.equals(traceOptions, that.traceOptions); } SpanContext(TraceId traceId, SpanId spanId, TraceOptions traceOptions); }
SpanContext { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof SpanContext)) { return false; } SpanContext that = (SpanContext)obj; return Objects.equals(traceId, that.traceId) && Objects.equals(spanId, that.spanId) && Objects.equals(traceOptions, that.traceOptions); } SpanContext(TraceId traceId, SpanId spanId, TraceOptions traceOptions); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); TraceId getTraceId(); SpanId getSpanId(); TraceOptions getTraceOptions(); SpanContext overrideOptions(TraceOptions overrideOptions); }
SpanContext { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof SpanContext)) { return false; } SpanContext that = (SpanContext)obj; return Objects.equals(traceId, that.traceId) && Objects.equals(spanId, that.spanId) && Objects.equals(traceOptions, that.traceOptions); } SpanContext(TraceId traceId, SpanId spanId, TraceOptions traceOptions); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); TraceId getTraceId(); SpanId getSpanId(); TraceOptions getTraceOptions(); SpanContext overrideOptions(TraceOptions overrideOptions);  }