Code example for LinkedHashMap

Methods: put

0
 
    } 
 
    @Test 
    public void hkeys() { 
	Map<String, String> hash = new LinkedHashMap<String, String>();
	hash.put("bar", "car");
	hash.put("car", "bar");
	jedis.hmset("foo", hash);
 
	Set<String> keys = jedis.hkeys("foo");
	Set<String> expected = new LinkedHashSet<String>();
	expected.add("bar");
	expected.add("car");
	assertEquals(expected, keys);
 
	// Binary 
	Map<byte[], byte[]> bhash = new LinkedHashMap<byte[], byte[]>();
	bhash.put(bbar, bcar);
	bhash.put(bcar, bbar);
	jedis.hmset(bfoo, bhash);