@crdlc : 

Do want me to make it like : 

"
if (earlySwipe && 
   Math.abs(currentX - startX) > swipeDistance &&
   Math.abs(panningResolver.getVelocity()) > swipeVelocity && 
   !(forward == false && currentPage == 0) &&
   !(forward == true && currentPage == pages.length - 1) ) {            "

Please clear my doubts. I will update after getting positive indication from you.  Thanks a lot .