T
- type of resultpublic interface ResultProperty<T> extends Comparator<T>, Serializable
Modifier and Type | Method and Description |
---|---|
int |
compare(T a,
T b)
Compares two hits on this property.
|
boolean |
equals(Object obj) |
PropertyValue |
get(T hit)
Get the property value for a specific result.
|
int |
hashCode() |
static String |
ignoreSensitivity(String info)
Strip sensitivity information.
|
default boolean |
isCompound() |
boolean |
isReverse()
Is the comparison reversed?
|
String |
name()
Get the name of the property
|
default List<String> |
propNames()
Get the names of all (sub-)properties separately.
|
default List<? extends ResultProperty<T>> |
props() |
ResultProperty<T> |
reverse()
Reverse the sort order of this hit property.
|
String |
serialize()
Serialize this HitProperty so we can deserialize it later (to pass it via
URL, for example)
|
String |
serializeReverse() |
String |
toString() |
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
static String ignoreSensitivity(String info)
info
- input stringPropertyValue get(T hit)
hit
- result to get property value forint compare(T a, T b)
compare
in interface Comparator<T>
a
- first hitb
- second hitString name()
String serialize()
ResultProperty<T> reverse()
boolean isReverse()
default List<String> propNames()
boolean equals(Object obj)
equals
in interface Comparator<T>
equals
in class Object
default boolean isCompound()
default List<? extends ResultProperty<T>> props()
String serializeReverse()
Copyright © 2020 Instituut voor Nederlandse Taal (INT). All rights reserved.