public final class Term extends Object implements Comparable, Serializable
Constructor and Description |
---|
Term(String fld,
String txt)
Constructs a Term with the given field and text.
|
Term(String fld,
String txt,
String type) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object other) |
int |
compareTo(Term other)
Compares two terms, returning an integer which is less than zero iff this
term belongs after the argument, equal zero iff this term is equal to the
argument, and greater than zero iff this term belongs after the argument.
|
boolean |
equals(Object o)
Compares two terms, returning true iff they have the same
field and text.
|
String |
field()
Returns the field of this term, an interned string.
|
int |
hashCode()
Combines the hashCode() of the field and the text.
|
int |
indexCompareTo(Term other) |
String |
text()
Returns the text of this term.
|
String |
toString() |
String |
type() |
public final String field()
public final String type()
public final String text()
public final boolean equals(Object o)
public final int hashCode()
public int compareTo(Object other)
compareTo
in interface Comparable
public final int compareTo(Term other)
public final int indexCompareTo(Term other)
Copyright © 2024 GATE. All rights reserved.