Java Check If String Ends With Substring