title: direct access to vector elements similar to arrays
body: <p>I'm currently creating a tile based game, where elements of the games are placed in four different vectors (since there are multiple game objects with different properties, hence stored in different vectors). </p>
  
  <p>These game elements themselves contain x and y coordinates similar to how they are stored in a two dimensional array. i was wondering if there was a way to access these vector elements similar to two dimensional array access (currently i am implementing an for loop to cycle the elements while comparing its coordinates). </p>
  
  <p>This kinda sucks when i need to refresh my display at every game cycle (since the large number of comparisons and loops).</p>
  
  <p>I'm implementing this in java btw.</p>