T
- type of result, e.g. HitG
- group type, e.g. HitGrouppublic abstract class GroupProperty<T,G extends Group<T>> extends Object implements ResultProperty<G>
Modifier and Type | Field and Description |
---|---|
protected boolean |
reverse
Reverse comparison result or not?
|
Constructor and Description |
---|
GroupProperty() |
Modifier and Type | Method and Description |
---|---|
abstract int |
compare(G a,
G b)
Compares two hits on this property.
|
boolean |
equals(Object obj) |
abstract PropertyValue |
get(G result)
Get the property value for a specific result.
|
int |
hashCode() |
boolean |
isReverse()
Is the comparison reversed?
|
abstract GroupProperty<T,G> |
reverse()
Reverse the comparison.
|
abstract String |
serialize()
Serialize this HitProperty so we can deserialize it later (to pass it via
URL, for example)
|
String |
serializeReverse()
Used by subclasses to add a dash for reverse when serializing
|
protected boolean |
sortDescendingByDefault()
Is the default for this property to sort descending?
This is usually a good default for "group size" or "number of hits".
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
ignoreSensitivity, isCompound, name, propNames, props
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
protected boolean sortDescendingByDefault()
public abstract PropertyValue get(G result)
ResultProperty
get
in interface ResultProperty<G extends Group<T>>
result
- result to get property value forpublic abstract int compare(G a, G b)
ResultProperty
compare
in interface Comparator<G extends Group<T>>
compare
in interface ResultProperty<G extends Group<T>>
a
- first hitb
- second hitpublic abstract String serialize()
ResultProperty
serialize
in interface ResultProperty<G extends Group<T>>
public String serializeReverse()
serializeReverse
in interface ResultProperty<G extends Group<T>>
public boolean isReverse()
isReverse
in interface ResultProperty<G extends Group<T>>
public abstract GroupProperty<T,G> reverse()
reverse
in interface ResultProperty<G extends Group<T>>
public String toString()
public int hashCode()
Copyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.