Code example for LinkedHashSet

Methods: add

0
        jedis.zadd("foo", 0.1d, "c"); 
        jedis.zadd("foo", 2d, "a"); 
 
        Set<Tuple> range = jedis.zrangeByScoreWithScores("foo", 0d, 2d);
 
        Set<Tuple> expected = new LinkedHashSet<Tuple>();
        expected.add(new Tuple("c", 0.1d));
        expected.add(new Tuple("a", 2d));
 
        assertEquals(expected, range);
 
        range = jedis.zrangeByScoreWithScores("foo", 0d, 2d, 0, 1);
 
        expected = new LinkedHashSet<Tuple>();
        expected.add(new Tuple("c", 0.1d));
 
        assertEquals(expected, range);
 
        range = jedis.zrangeByScoreWithScores("foo", 0d, 2d, 1, 1);
 
        expected = new LinkedHashSet<Tuple>();