Java implementation of the Aho-Corasick algorithm for efficient string matching