boolean (long from, long to) { if (from < myFrom || to > myTo) return false; if (to == from) return contains(from); if (to - from < 0 || to - from >= myMod) return false; int fromBit = remainder(from, myMod); int toBit = remainder(to, myMod); if (fromBit < toBit) { return Long.numberOfTrailingZeros(~(myBits >>> fromBit)) > toBit - fromBit; } return Long.numberOfTrailingZeros(~myBits) > toBit && Long.SIZE - Long.numberOfLeadingZeros((~myBits) & getMask()) <= fromBit; }