mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
IDEA-225778 Inline object with the subsequent call
GitOrigin-RevId: 122e10e69f93c31e289a024381c7315f1a62203b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7b5dcb3d80
commit
c57a3e9f2a
@@ -0,0 +1,22 @@
|
||||
class Main {
|
||||
BitString test(long result, long mask) {
|
||||
BitString intersection = new <caret>BitString(result, mask).intersect(super.getBitwiseMask());
|
||||
assert intersection != null;
|
||||
return intersection;
|
||||
}
|
||||
}
|
||||
|
||||
class BitString {
|
||||
final long myBits;
|
||||
final long myMask;
|
||||
|
||||
BitString(long bits, long mask) {
|
||||
myBits = bits & mask;
|
||||
myMask = mask;
|
||||
}
|
||||
BitString intersect(BitString other) {
|
||||
long intersectMask = myMask & other.myMask;
|
||||
if ((myBits & intersectMask) != (other.myBits & intersectMask)) return null;
|
||||
return new BitString(myBits | other.myBits, myMask | other.myMask);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user