Here you can find the source of endsWithAny(String stringToMatch, String... stringToCheckEquals)
public static boolean endsWithAny(String stringToMatch, String... stringToCheckEquals)
//package com.java2s; //License from project: Apache License public class Main { public static boolean endsWithAny(String stringToMatch, String... stringToCheckEquals) { for (final String candidate : stringToCheckEquals) { if (stringToMatch.endsWith(candidate)) { return true; }/*from w w w.ja v a 2 s . co m*/ } return false; } }