Change class use API.
Use java collection to improve compatibility.