import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
+import java.util.Collection;
import java.util.Collections;
import java.util.NavigableSet;
import java.util.TreeSet;
public abstract @NonNull ImmutableUnsignedLongSet immutableCopy();
public final @NonNull MutableUnsignedLongSet mutableCopy() {
- return new MutableUnsignedLongSet(new TreeSet<>(Collections2.transform(ranges, Entry::copy)));
+ return new MutableUnsignedLongSet(new TreeSet<>(copiedRanges()));
}
public final @NonNull NavigableSet<Entry> ranges() {
return ranges;
}
+ final @NonNull Collection<Entry> copiedRanges() {
+ return Collections2.transform(ranges, Entry::copy);
+ }
+
@Override
public final int hashCode() {
return ranges.hashCode();