Java access object like array
<p>In PHP, there is an ArrayAccess interface which allows you to access an object like an array. Is there a Java-equivalant to this? It would be very handy.</p>

<p>thanks</p>
