Check If String Has Certain Characters Java