Package redis.clients.jedis

Examples of redis.clients.jedis.BitPosParams


  long offset = jedis.bitpos(foo, true);
  assertEquals(2, offset);
  offset = jedis.bitpos(foo, false);
  assertEquals(0, offset);

  offset = jedis.bitpos(foo, true, new BitPosParams(1));
  assertEquals(13, offset);
  offset = jedis.bitpos(foo, false, new BitPosParams(1));
  assertEquals(8, offset);

  offset = jedis.bitpos(foo, true, new BitPosParams(2, 3));
  assertEquals(-1, offset);
  offset = jedis.bitpos(foo, false, new BitPosParams(2, 3));
  assertEquals(16, offset);

  offset = jedis.bitpos(foo, true, new BitPosParams(3, 4));
  assertEquals(39, offset);
    }
View Full Code Here


  long offset = jedis.bitpos(bfoo, true);
  assertEquals(2, offset);
  offset = jedis.bitpos(bfoo, false);
  assertEquals(0, offset);

  offset = jedis.bitpos(bfoo, true, new BitPosParams(1));
  assertEquals(13, offset);
  offset = jedis.bitpos(bfoo, false, new BitPosParams(1));
  assertEquals(8, offset);

  offset = jedis.bitpos(bfoo, true, new BitPosParams(2, 3));
  assertEquals(-1, offset);
  offset = jedis.bitpos(bfoo, false, new BitPosParams(2, 3));
  assertEquals(16, offset);

  offset = jedis.bitpos(bfoo, true, new BitPosParams(3, 4));
  assertEquals(39, offset);
    }
View Full Code Here

  /*
   * byte: 0 1 2 3 4 bit: 11111111 / 11111111 / 11111111 / 11111111 /
   * 11111111
   */
  long offset = jedis.bitpos(foo, false, new BitPosParams(2, 3));
  // offset should be -1
  assertEquals(-1, offset);
    }
View Full Code Here

TOP

Related Classes of redis.clients.jedis.BitPosParams

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.