# CollectionSchemaField Class

> Allows for the creation of collection schema field objects.

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

```java
class CollectionSchemaField
```

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

## Description

Allows for the creation of collection schema field objects. Parameters that are part of a schema's field may be set.

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

## Constructors

### CollectionSchemaField

```java
com.datalogics.PDFL.CollectionSchemaField.CollectionSchemaField(String fieldID, SchemaFieldSubtype subtype)
```

*constructor*

**Parameters**

- `fieldID` (`String`): the schema field ID. The ID is used during creation and extraction of the schema field. It is the unique identifier of the schema field.
- `subtype` (`SchemaFieldSubtype`): the schema field subtype. The subtypes are predefined. The value of this parameter must correspond to the one of the SchemaFieldSubtype enum values.

CCollectionSchemaField allows to create CollectionSchemaField object. The constructor accepts identifier value and subtype required by the schema field.

## Methods

### delete

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

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

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

**Returns:** `synchronized void`

### finalize

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

*protected*

**Returns:** `void`

### getEditable

```java
boolean com.datalogics.PDFL.CollectionSchemaField.getEditable()
```

**Returns:** `boolean`

whether edit mode is allowed or not.

GetEditable allows to obtain information about edit mode of the current field.

### getID

```java
String com.datalogics.PDFL.CollectionSchemaField.getID()
```

**Returns:** `String`

the unique field's id.

GetID allows to obtain the unique id with which schema field has been created.

### getIndex

```java
int com.datalogics.PDFL.CollectionSchemaField.getIndex()
```

**Returns:** `int`

the index of the field.

GetIndex allows to obtain field index.

### getName

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

**Returns:** `String`

the field name.

GetName allows to obtain field name.

### getSubtype

```java
SchemaFieldSubtype com.datalogics.PDFL.CollectionSchemaField.getSubtype()
```

**Returns:** `SchemaFieldSubtype`

field subtype. One of the ShemaFieldSubtype enum values.

GetSubtype allows to obtain the field subtype.

### getVisible

```java
boolean com.datalogics.PDFL.CollectionSchemaField.getVisible()
```

**Returns:** `boolean`

true if current schema field is visible, false otherwise.

GetVisible allows to obtain information about filed visibility.

### setEditable

```java
void com.datalogics.PDFL.CollectionSchemaField.setEditable(boolean isEditable)
```

**Parameters**

- `isEditable` (`boolean`): pass true to allow to edit this field or false otherwise.

**Returns:** `void`

SetEditable allows to change edit mode for shema field.Its value false by default.

### setIndex

```java
void com.datalogics.PDFL.CollectionSchemaField.setIndex(int idx)
```

**Parameters**

- `idx` (`int`): field index.

**Returns:** `void`

SetIndex allows to set field index. NOTE: the field indexes are zero-based in ascending order without gaps.

### setName

```java
void com.datalogics.PDFL.CollectionSchemaField.setName(String name)
```

**Parameters**

- `name` (`String`): the new field name.

**Returns:** `void`

SetName allows to change field name.

### setVisible

```java
void com.datalogics.PDFL.CollectionSchemaField.setVisible(boolean isVisible)
```

**Parameters**

- `isVisible` (`boolean`): the visibility flag.

**Returns:** `void`

SetVisible allows to set field's default visibility.Its value true by default.
