public class HitPropertyHitPosition extends HitProperty
contexts, hits, logger, reverse
Constructor and Description |
---|
HitPropertyHitPosition() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Hit a,
Hit b)
Compares two hits on this property.
|
HitProperty |
copyWith(Results<Hit> newHits,
Contexts contexts,
boolean invert)
Produce a copy of this HitProperty object with a different Hits and Contexts
object.
|
PropertyValueInt |
get(Hit result)
Get the property value for a specific result.
|
String |
name()
Get the name of the property
|
String |
serialize()
Serialize this HitProperty so we can deserialize it later (to pass it via
URL, for example)
|
copyWith, deserialize, deserialize, docPropsOnly, docPropValues, equals, hashCode, isReverse, needsContext, needsContextSize, reverse, serializeReverse, setContextIndices, setContexts, sortDescendingByDefault, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
ignoreSensitivity, isCompound, propNames, props
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public HitProperty copyWith(Results<Hit> newHits, Contexts contexts, boolean invert)
HitProperty
copyWith
in class HitProperty
newHits
- new Hits to use, or null to inheritcontexts
- new Contexts to use, or null to inheritinvert
- true if we should invert the previous sort order; false to keep it the samepublic PropertyValueInt get(Hit result)
ResultProperty
get
in interface ResultProperty<Hit>
get
in class HitProperty
result
- result to get property value forpublic String name()
ResultProperty
name
in interface ResultProperty<Hit>
name
in class HitProperty
public int compare(Hit a, Hit b)
ResultProperty
compare
in interface Comparator<Hit>
compare
in interface ResultProperty<Hit>
compare
in class HitProperty
a
- first hitb
- second hitpublic String serialize()
ResultProperty
serialize
in interface ResultProperty<Hit>
serialize
in class HitProperty
Copyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.