let me say first that I did try to Google this, but I'm not really sure what I'm looking for. I understand I could use a setter method, but is there a way to access the fields directly?
List<String> token = new ArrayList<String>();
List<String> lemma = new ArrayList<String>();
List<String> pos = new ArrayList<String>();
tt.setHandler(new TokenHandler<String>() {
@Override
public void token(final String token, final String pos, final String lemma) {
this.token.add(token); // cannot be resolved or is not a field
this.lemma.add(lemma); // cannot be resolved or is not a field
this.pos.add(pos); // cannot be resolved or is not a field
}
});
Can you help me?!
Thanks!
Bob