public Node selectFirst ( final String query ) { List < Node > selectedNodes = select ( query ) ; if ( selectedNodes . isEmpty ( ) ) { return null ; } return selectedNodes . get ( 0 ) ; }
Selects nodes using CSS3 selector query and returns the very first one .