-
- All Implemented Interfaces:
-
io.getstream.chat.android.client.api.models.querysort.QuerySorter
public class QuerySortByReflection<T extends Object> extends BaseQuerySort<T>
Sort specification for api queries. You can specify QuerySortByReflection by referencing kotlin class property or passing field name as string instance. QuerySortByReflection.asc(Channel::memberCount) and QuerySortByReflection.asc<Channel>("member_count") mean the same.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classQuerySortByReflection.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Comparator<in T>comparator
-
Constructor Summary
Constructors Constructor Description QuerySortByReflection()
-
Method Summary
-
-
Method Detail
-
comparatorFromFieldSort
Comparator<T> comparatorFromFieldSort(SortAttribute.FieldSortAttribute<T> firstSort, SortDirection sortDirection)
Comparator from SortAttribute.FieldSortAttribute
-
comparatorFromNameAttribute
Comparator<T> comparatorFromNameAttribute(SortAttribute.FieldNameSortAttribute<T> name, SortDirection sortDirection)
Comparator from SortAttribute.FieldNameSortAttribute
-
asc
QuerySortByReflection<T> asc(KProperty1<T, Comparable<?>> field)
Creates a QuerySortByReflection with ASC as SortDirection
-
asc
QuerySortByReflection<T> asc(String fieldName, Class<T> javaClass)
Creates a QuerySortByReflection with ASC as SortDirection
-
asc
QuerySortByReflection<T> asc(String fieldName)
Creates a QuerySortByReflection with ASC as SortDirection
-
asc
QuerySortByReflection<T> asc(String fieldName, KClass<T> kClass)
Creates a QuerySortByReflection with ASC as SortDirection
-
desc
QuerySortByReflection<T> desc(KProperty1<T, Comparable<?>> field)
Creates a QuerySortByReflection with DESC as SortDirection
-
desc
QuerySortByReflection<T> desc(String fieldName, Class<T> javaClass)
Creates a QuerySortByReflection with DESC as SortDirection
-
desc
QuerySortByReflection<T> desc(String fieldName)
Creates a QuerySortByReflection with DESC as SortDirection
-
desc
QuerySortByReflection<T> desc(String fieldName, KClass<T> kClass)
Creates a QuerySortByReflection with DESC as SortDirection
-
-
-
-