import static com.google.common.base.Verify.verify;
import static java.util.Objects.requireNonNull;
+import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableRangeSet;
import com.google.common.collect.Range;
import com.google.common.collect.RangeSet;
this.meta = requireNonNull(meta);
final var tmp = ranges.asRanges();
- if (tmp.size() == 1) {
- this.ranges = tmp.iterator().next();
- } else {
- this.ranges = ImmutableRangeSet.copyOf(ranges);
- }
+ this.ranges = tmp.size() == 1 ? tmp.iterator().next() : ImmutableRangeSet.copyOf(ranges);
}
@Override
return meta.getReference();
}
+ @Override
+ public final String toString() {
+ return MoreObjects.toStringHelper(this).add("ranges", ranges()).toString();
+ }
+
@SuppressWarnings("unchecked")
final @NonNull ImmutableRangeSet<T> ranges() {
if (ranges instanceof ImmutableRangeSet) {