public int apply(char s[], int len) {if (len < min)return len;if (suffixes != null) {boolean found = false;for (int i = 0; i < suffixes.length; i++)if (endsWith(s, len, suffixes[i])) {found = true;break;}if (!found) return len;}for (int i = 0; i < rules.length; i++) {if (rules[i].matches(s, len))return rules[i].replace(s, len);}return len;}
public virtual int Apply(char[] s, int len){if (len < m_min){return len;}if (m_suffixes != null){bool found = false;for (int i = 0; i < m_suffixes.Length; i++){if (StemmerUtil.EndsWith(s, len, m_suffixes[i])){found = true;break;}}if (!found){return len;}}for (int i = 0; i < m_rules.Length; i++){if (m_rules[i].Matches(s, len)){return m_rules[i].Replace(s, len);}}return len;}