import java.util.ArrayList; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement() public class ArrayOfAddresses { @XmlElement(name = "point") private ArrayList<Address> list; public ArrayOfAddresses() { list = new ArrayList<Address>(); } public ArrayOfAddresses(ArrayList<Address> l) { list = l; } public void Add(Address v) { list.add(v); } public int Length() { return list.size(); } public Address getPoint(int index) { Address ev; try { ev = list.get(index); } catch(Exception ex) { ev = null; } return ev; } }