Java Code Examples for org.apache.rocketmq.filter.util.BitsArray#clone()

The following examples show how to use org.apache.rocketmq.filter.util.BitsArray#clone() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BitsArrayTest.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
@Test
public void testNot() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    bitsArray.not(2);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}
 
Example 2
Source File: BitsArrayTest.java    From rocketmq-4.3.0 with Apache License 2.0 5 votes vote down vote up
@Test
public void testNot() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    bitsArray.not(2);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}
 
Example 3
Source File: BitsArrayTest.java    From rocketmq-read with Apache License 2.0 5 votes vote down vote up
@Test
public void testNot() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    bitsArray.not(2);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}
 
Example 4
Source File: BitsArrayTest.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
@Test
public void testNot() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    bitsArray.not(2);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}
 
Example 5
Source File: BitsArrayTest.java    From rocketmq-all-4.1.0-incubating with Apache License 2.0 5 votes vote down vote up
@Test
public void testNot() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    bitsArray.not(2);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}
 
Example 6
Source File: BitsArrayTest.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
@Test
public void testNot() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    bitsArray.not(2);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}
 
Example 7
Source File: BitsArrayTest.java    From DDMQ with Apache License 2.0 3 votes vote down vote up
@Test
public void testSet() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    boolean val = bitsArray.getBit(2);

    bitsArray.setBit(2, !val);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}
 
Example 8
Source File: BitsArrayTest.java    From rocketmq-4.3.0 with Apache License 2.0 3 votes vote down vote up
@Test
public void testSet() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    boolean val = bitsArray.getBit(2);

    bitsArray.setBit(2, !val);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}
 
Example 9
Source File: BitsArrayTest.java    From rocketmq-read with Apache License 2.0 3 votes vote down vote up
@Test
public void testSet() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    boolean val = bitsArray.getBit(2);

    bitsArray.setBit(2, !val);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}
 
Example 10
Source File: BitsArrayTest.java    From DDMQ with Apache License 2.0 3 votes vote down vote up
@Test
public void testSet() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    boolean val = bitsArray.getBit(2);

    bitsArray.setBit(2, !val);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}
 
Example 11
Source File: BitsArrayTest.java    From rocketmq-all-4.1.0-incubating with Apache License 2.0 3 votes vote down vote up
@Test
public void testSet() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    boolean val = bitsArray.getBit(2);

    bitsArray.setBit(2, !val);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}
 
Example 12
Source File: BitsArrayTest.java    From rocketmq with Apache License 2.0 3 votes vote down vote up
@Test
public void testSet() {
    BitsArray bitsArray = gen(bitLength);
    BitsArray backUp = bitsArray.clone();

    boolean val = bitsArray.getBit(2);

    bitsArray.setBit(2, !val);

    bitsArray.xor(backUp);

    assertThat(bitsArray.getBit(2)).isTrue();
}