TreeSet<Pair<String, String>> istovjetna = new TreeSet<Pair<String, String>>();
for (Pair<String, String> par : parovi) {
if (!distinguishable.contains(par)) {
istovjetna.add(par);
System.out.println(par.toString());
}
}
So this is a small part of the code I've been writing to minimize a DKA, more precisely, to find the equivalent states.
The problem that I'm encountering is that the Pair class isn't comparable so functions such as "contains" won't work and I'll have to make a big overhaul.
In the example above, it will call an error on the if clause. Is there a quick workaround for this exact problem?