If not present then return
if ( pCrawl . children [ index ] == null ) return ; pCrawl = pCrawl . children [ index ] ; } for ( int i : pCrawl . pos ) { if ( i == id ) continue ; List < Integer > l = new ArrayList < > ( ) ; l . add ( id ) ; l . add ( i ) ; result . add ( l ) ; } }