- Enclosing interface:
- Annotator
public static class Annotator.Requirement
extends Object
The Requirement is a general way of describing the pre and post
conditions of an Annotator running. Typical use is to have
constants for the different requirement types, such as the
TOKENIZE_REQUIREMENT below, and to reuse those constants instead
of creating new objects. It is also possible to subclass
Requirement if an Annotator has a more general output. For
example, one could imagine a TsurgeonAnnotator which has a wide
range of possible effects; this would probably subclass
Requirement to indicate which particular surgery it provided.
We do nothing to override the equals or hashCode methods. This
means that two Requirements are equal iff they are the same
object. We do not want to use name
to decide
equality because a subclass that uses more information, such as
the particular kind of tsurgeon used in a hypothetical
TsurgeonAnnotator, cannot use a stricter equals() than the
superclass. It is hard to get stricter than ==.