* @param bottomright * @return */ public LinkedList getRegion(Location topleft, Location bottomright){ //Wir bekommen einen Streifen, xFits enthält die Punkte, bei denen die x-Koordinate stimmt SortedSet xFits = subSet(topleft, bottomright); //Jetzt filtern wir noch die in y-Richtung ungültigen Einträge heraus. LinkedList list = new LinkedList(); Iterator xFitsIterator = xFits.iterator(); while( xFitsIterator.hasNext()){ Location loc = (Location) xFitsIterator.next(); if (loc.y >= topleft.y && loc.y <= bottomright.y){ list.add(loc); } } return list; }}