private Belief getResultAtIndex ( Set < Belief > results , int index ) { Belief belief = null ; if ( ! ( results == null || index < 0 || index >= results . size ( ) ) ) { int idx = 0 ; for ( Belief b : results ) { if ( idx == index ) { belief = b ; break ; } idx ++ ; } } return belief ; }
Gets the result at the given index from the results set .