private boolean isInvPart ( List < InvPair > v ) { if ( ( ( InvPair ) v . get ( v . size ( ) - 1 ) ) . getCurr ( ) == v . size ( ) ) return true ; Iterator < InvPair > it = v . iterator ( ) ; InvPair curr ; while ( it . hasNext ( ) ) { curr = ( InvPair ) it . next ( ) ; if ( curr . getCurr ( ) != curr . getLast ( ) ) return false ; } return true ; }
Checks to see if the vector is invariantly partitioned