public final class Term extends implements <Term>, Accountable
NULL_ACCOUNTABLE
Constructor and Description |
---|
fld)
Constructs a Term with the given field and empty text.
|
fld,
BytesRef bytes)
Constructs a Term with the given field and bytes.
|
fld,
BytesRefBuilder bytesBuilder)
Constructs a Term with the given field and the bytes from a builder.
|
fld,
text)
Constructs a Term with the given field and text.
|
Modifier and Type | Method and Description |
---|---|
BytesRef |
bytes()
Returns the bytes of this term, these should not be modified.
|
int |
compareTo(Term other)
Compares two terms, returning a negative integer if this
term belongs before the argument, zero if this term is equal to the
argument, and a positive integer if this term belongs after the argument.
|
boolean |
obj) |
|
field()
Returns the field of this term.
|
int |
hashCode() |
long |
ramBytesUsed()
Return the memory usage of this object in bytes.
|
|
text()
Returns the text of this term.
|
|
toString() |
static |
toString(BytesRef termText)
Returns human-readable form of the term text.
|
getChildResources
public Term( fld, BytesRef bytes)
Note that a null field or null bytes value results in undefined behavior for most Lucene APIs that accept a Term parameter.
The provided BytesRef is copied when it is non null.
public Term( fld, BytesRefBuilder bytesBuilder)
Note that a null field value results in undefined behavior for most Lucene APIs that accept a Term parameter.
public Term( fld, text)
Note that a null field or null text value results in undefined behavior for most Lucene APIs that accept a Term parameter.
public Term( fld)
fld
- field's namepublic final field()
public final text()
public static final toString(BytesRef termText)
public final BytesRef bytes()
public boolean equals( obj)
in class
public int hashCode()
in class
public final int compareTo(Term other)
in interface <Term>
public final toString()
in class
public long ramBytesUsed()
Accountable
ramBytesUsed
in interface Accountable
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.