CPD Results
The following document contains the results of PMD's CPD 6.55.0.
Duplications
| File | Project | Line |
|---|---|---|
| com/soebes/training/maven/simple/BitMask.java | TMPG :: Testing :: Unit Test Example (JUnit Jupiter) | 11 |
| com/soebes/training/maven/simple/BitMask.java | TMPG :: Testing :: Unit Test Example (TestNG) | 11 |
| com/soebes/training/maven/simple/BitMask.java | TMPG :: Testing :: Unit Test Example | 11 |
public class BitMask {
private long bitMaskValue;
public long getBitMaskValue() {
return bitMaskValue;
}
public BitMask() {
bitMaskValue = 0;
}
public BitMask(long currentValue) {
this.bitMaskValue = currentValue;
}
public void setBit(int bit) {
long bitMask = Long.rotateLeft(1, bit);
bitMaskValue |= bitMask;
}
public void unsetBit(int bit) {
long bitMask = Long.rotateLeft(1, bit);
bitMaskValue ^= bitMask;
}
public boolean isBitSet(int bit) {
long bitMask = Long.rotateLeft(1, bit);
long result = this.bitMaskValue & bitMask;
if (result != 0) {
return true;
}
return false;
}
} | ||

