public boolean validate ( ) { boolean correct = true ; if ( population ( ) > 1 ) { java . util . Comparator comp = index ( ) . insertComparator ( ) ; int xcc = 0 ; for ( int i = 0 ; i < population ( ) - 1 ; i ++ ) { xcc = comp . compare ( _nodeKey [ i ] , _nodeKey [ i + 1 ] ) ; if ( ! ( xcc < 0 ) ) { System . out . println ( "Entry " + i + " not less than entry " + i + 1 ) ; correct = false ; } } } return correct ; }
Used by test code to make sure that all of the keys within a node are in the correct collating sequence .