Check If It Is a Straight Line java