public MsetCommand(Transcoder transcoder, String command, Map<String, ?> map) { this.command = command; setTranscoder(transcoder); byte[][] byteArgs = new byte[map.size() * 2][]; int i = 0; for (String key : map.keySet()) { byteArgs[i] = TranscoderUtils.encodeString(key); //noinspection unchecked byteArgs[i + 1] = getTranscoder().encode(map.get(key)); i += 2; } init(byteArgs); }