public class DefaultTermOccurrence extends AbstractOccurrenceInText<Term> implements TermOccurrence
TermOccurrence interface. It just
holds the term plus where it occurred.| Modifier and Type | Field and Description |
|---|---|
protected Term |
term
The term that occurred.
|
DEFAULT_LENGTH, DEFAULT_START, length, start| Constructor and Description |
|---|
DefaultTermOccurrence()
Creates a new
DefaultTermOccurrence with default values. |
DefaultTermOccurrence(Term term,
int start,
int length)
Creates a new
DefaultTermOccurrence. |
| Modifier and Type | Method and Description |
|---|---|
Term |
asTerm()
Get the term for the object.
|
boolean |
equals(DefaultTermOccurrence other)
Determines if this
DefaultTermOccurrence equals a given
DefaultTermOccurrence. |
boolean |
equals(java.lang.Object other) |
Term |
getData()
Gets the data that occurred in the text.
|
Term |
getTerm()
Gets the term that occurred in the text.
|
int |
hashCode() |
void |
setTerm(Term term)
Sets the term that occurred.
|
getLength, getStart, setLength, setStartclonefinalize, getClass, notify, notifyAll, toString, wait, wait, waitgetLength, getStartprotected Term term
public DefaultTermOccurrence()
DefaultTermOccurrence with default values.public DefaultTermOccurrence(Term term, int start, int length)
DefaultTermOccurrence.term - The term that occurred.start - The starting point of the occurrence in the source text.length - The length of the occurrence in the source text.public Term asTerm()
Termablepublic Term getData()
OccurrenceInTextgetData in interface OccurrenceInText<Term>public Term getTerm()
TermOccurrencegetTerm in interface TermOccurrencepublic void setTerm(Term term)
term - The term that occurred.public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(DefaultTermOccurrence other)
DefaultTermOccurrence equals a given
DefaultTermOccurrence.other - The other object.