All pastes #2315 Raw Edit

ziggystar

public java v1 · immutable
#2315 ·published 2004-11-24 23:22 UTC
rendered paste body
	 * @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;	}}