question: private static boolean containedIn ( final Rectangle2D r , final Collection < Polygon > shapes ) { for ( final Shape item : shapes ) { if ( item . contains ( r ) ) { return true ; } } return false ; }
target:  java.lang.boolean containedIn(java.awt.geom.Rectangle2D, java.tools.Collection) Function to test if the given 2D rectangle is contained in any of the given shapes in the collection.