public class UnnamedConcreteDependency extends UnnamedDependency
A key difference between this class and UnnamedDependency is the equals() method. Equality of two UnnamedConcreteDependency objects is defined solely with respect to the indices. The surface forms are not considered. This permits a use case in which dependencies in two different parse trees have slightly different pre-processing, possibly due to pre-processing.
dependentText, regentText
Constructor and Description |
---|
UnnamedConcreteDependency(Label regent,
int regentIndex,
Label dependent,
int dependentIndex) |
UnnamedConcreteDependency(Label regent,
Label dependent) |
UnnamedConcreteDependency(java.lang.String regent,
int regentIndex,
java.lang.String dependent,
int dependentIndex) |
Modifier and Type | Method and Description |
---|---|
DependencyFactory |
dependencyFactory()
Provide a factory for this kind of dependency
|
boolean |
equals(java.lang.Object o) |
static DependencyFactory |
factory() |
int |
getDependentIndex() |
int |
getGovernorIndex() |
int |
hashCode() |
java.lang.String |
toString() |
java.lang.String |
toString(java.lang.String format)
Provide different printing options via a String keyword.
|
dependent, equalsIgnoreName, getText, governor, name
public UnnamedConcreteDependency(java.lang.String regent, int regentIndex, java.lang.String dependent, int dependentIndex)
public UnnamedConcreteDependency(Label regent, int regentIndex, Label dependent, int dependentIndex)
public int getGovernorIndex()
public int getDependentIndex()
public int hashCode()
hashCode
in class UnnamedDependency
public boolean equals(java.lang.Object o)
equals
in class UnnamedDependency
public java.lang.String toString()
toString
in class UnnamedDependency
public java.lang.String toString(java.lang.String format)
toString
in interface Dependency<Label,Label,java.lang.Object>
toString
in class UnnamedDependency
format
- A format string, either "xml" or you get the defaultpublic DependencyFactory dependencyFactory()
Dependency
dependencyFactory
in interface Dependency<Label,Label,java.lang.Object>
dependencyFactory
in class UnnamedDependency
public static DependencyFactory factory()