I'm just copying the example from this github project page without any change and it's giving me a compile error
To reproduce, add this dependency to your pom
<dependency>
<groupId>com.hankcs</groupId>
<artifactId>aho-corasick-double-array-trie</artifactId>
<version>1.2.1</version>
</dependency>
Then try to run this:
// Collect test data set
TreeMap<String, String> map = new TreeMap<String, String>();
String[] keyArray = new String[]
{
"hers",
"his",
"she",
"he"
};
for (String key : keyArray)
{
map.put(key, key);
}
// Build an AhoCorasickDoubleArrayTrie
AhoCorasickDoubleArrayTrie<String> acdat = new AhoCorasickDoubleArrayTrie<String>();
acdat.build(map);
// Test it
final String text = "uhers";
acdat.parseText(text, (begin, end, value) -> {
System.out.printf("[%d:%d]=%s\n", begin, end, value);
});
The compile error is
The method parseText(CharSequence, AhoCorasickDoubleArrayTrie.IHit<String>) is ambiguous for the type AhoCorasickDoubleArrayTrie<String>
Please let me know if you need anything to clarify. You should be able to reproduce this with what I have provided here though.
Also, it's been suggested this may be a duplicate question when I posted this previously, but I do not think that's the case as that question is not related to lambda functions. If I'm wrong, please help me understand how that question's answer can resolve what I'm experiencing