private boolean isInsideMappedRegion ( int position , int startPoint , int endPoint ) { boolean enclosed = ( position < endPoint && position >= startPoint ) ; boolean wrapAround = ( startPoint > endPoint && ( position >= startPoint || position < endPoint ) ) ; return enclosed || wrapAround ; }
Checks whether a given list position is within the partially mapped region used for cross - over .