protected abstract class AbstractMWEDesc.AbstractPart extends java.lang.Object implements IMWEDesc.IPart
IPart interface.| Constructor and Description |
|---|
AbstractPart(java.lang.String form,
int index)
Constructs a new part.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IMWEDesc.IPart o) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getForm()
Returns the object's surface form text, exactly as it appears in its
original context, with capitalization intact.
|
int |
getIndex()
Returns the index of this part in the multi-word expression, always
zero or greater.
|
IMWEDesc |
getParent()
Returns the MWE description of which this part is a part.
|
int |
hashCode() |
boolean |
isStopWord()
Returns true if the part is a stop word, that is, a word that is not
usually useful for searching.
|
java.lang.String |
toString() |
public AbstractPart(java.lang.String form,
int index)
form - the surface text of the part in the multi-word expression,
in its original form. It's trimmed form not be
null or contain whitespace.index - the index of the part in the multi-word expression. May
not be less than 0.java.lang.NullPointerException - if the parent or text is null.java.lang.IllegalArgumentException - if the trimmed text is empty or contains whitespace, or
if the index is less than 0.public IMWEDesc getParent()
IMWEDesc.IPartnull.getParent in interface IMWEDesc.IPartpublic java.lang.String getForm()
IHasFormnull.public int getIndex()
IMWEDesc.IPartgetIndex in interface IMWEDesc.IPartpublic boolean isStopWord()
IMWEDesc.IPartisStopWord in interface IMWEDesc.IParttrue if the part is a stop word;
false otherwise.public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(IMWEDesc.IPart o)
compareTo in interface java.lang.Comparable<IMWEDesc.IPart>public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.