SortOrder.Builder | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Tools & Reference
  - Developer Stories

## Results

Loading...
Summary: Ctors | Methods | Inherited Methods | [Expand All]
public static class

# SortOrder.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.drive.query.SortOrder.Builder

## Summary

Public Constructors
| SortOrder.Builder()

Public Methods
SortOrder.Builder | addSortAscending(SortableMetadataField sortField) Adds the `SortableMetadataField` to be used to sort the query results in ascending order of the values of the sortField.
SortOrder.Builder | addSortDescending(SortableMetadataField sortField) Adds the `SortableMetadataField` to be used to sort the query results in descending order of the values of the sortField.
SortOrder | build()

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Constructors

#### public SortOrder.Builder ()

## Public Methods

#### public SortOrder.Builder addSortAscending (SortableMetadataField sortField)

Adds the `SortableMetadataField` to be used to sort the query results in ascending order of the values of the sortField. Query results are sorted in the same order the fields are added.

##### Parameters

sortField | the field to be used to sort the query results in ascending order, see `SortableField` for the list of fields that can be used to sort query results

#### public SortOrder.Builder addSortDescending (SortableMetadataField sortField)

Adds the `SortableMetadataField` to be used to sort the query results in descending order of the values of the sortField. Query results are sorted in the same order the fields are added.

##### Parameters

sortField | the field to be used to sort the query results in descending order, see `SortableField` for the list of fields that can be used to sort query results

#### public SortOrder build ()