Code example for HashSet

Methods: add

0
 
        // Binary 
        jedis.sadd(bfoo, ba);
        jedis.sadd(bfoo, bb);
 
        Set<byte[]> bexpected = new HashSet<byte[]>();
        bexpected.add(bb);
        bexpected.add(ba);
 
        Set<byte[]> bmembers = jedis.smembers(bfoo);
 
        assertEquals(bexpected, bmembers);
    } 
     
    @Test 
    public void srem() { 
        jedis.sadd("foo", "a"); 
        jedis.sadd("foo", "b"); 
 
        long status = jedis.srem("foo", "a");