# CollectionSortItem Class

> Stores data about fields that viewers use for sorting collection items.

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2e
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/CollectionSortItem
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/llms.txt

```java
class CollectionSortItem
```

**Namespace:** `com::datalogics::PDFL`

## Description

Stores data about fields that viewers use for sorting collection items. Collections are aslo known as portfolios.

**Referenced by:** [`Collection`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Collection.md), [`CollectionSortItemPtrVector`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/CollectionSortItemPtrVector.md)

## Constructors

### CollectionSortItem

```java
com.datalogics.PDFL.CollectionSortItem.CollectionSortItem(String fieldID, boolean order)
```

*constructor*

**Parameters**

- `fieldID` (`String`): the schema field's id.
- `order` (`boolean`): true for ascending, false for descending

CCollectionSortItem allows to construct sort item which will be used for collection sorting.

## Methods

### delete

```java
synchronized void com.datalogics.PDFL.CollectionSortItem.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.CollectionSortItem.delete()
```

**Returns:** `synchronized void`

### finalize

```java
void com.datalogics.PDFL.CollectionSortItem.finalize()
```

*protected*

**Returns:** `void`

### getAscending

```java
boolean com.datalogics.PDFL.CollectionSortItem.getAscending()
```

**Returns:** `boolean`

true if the sort order is ascending, false if descending.

Gets whether the sort order is ascending.

### getName

```java
String com.datalogics.PDFL.CollectionSortItem.getName()
```

**Returns:** `String`

The field name to sort by.

Gets the field name used for sorting. This is the schema field identifier that determines which collection field is used as the sort key.
