Use java collection to improve compatibility.