**Inheritance:**
java.lang.Object, com.aspose.pdf.dataeditor.CosPdfPrimitive com.aspose.pdf.dataeditor.CosPdfBoolean, com.aspose.pdf.dataeditor.CosPdfPrimitive, com.aspose.pdf.dataeditor.CosPdfBoolean

**All Implemented Interfaces:**
ICosPdfPrimitive

```
public final class CosPdfBoolean extends CosPdfPrimitive
```

This class represents boolean type.

## Constructors

| Constructor | Description |
| --- | --- |
| [CosPdfBoolean](#CosPdfBoolean-boolean-) | Initializes a new instance of the {@code PdfBoolean} class. |

## Methods

| Method | Description |
| --- | --- |
| [equals](#equals-java.lang.Object-) | Determines that the specified object is equal to the current object. |
| [getValue](#getValue--) | Gets the value. Value: The value. |
| [hashCode](#hashCode--) | Get hashcode for current object. |
| [toCosPdfBoolean](#toCosPdfBoolean--) | Tries cast this instance to {@code CosPdfBoolean}. |
| [toString](#toString--) | Returns a {@link String} that represents the current {@link CosPdfBoolean}. |

### CosPdfBoolean {#CosPdfBoolean-boolean-}
```
public CosPdfBoolean(boolean value)
```

Initializes a new instance of the {@code PdfBoolean} class.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value |  | if set to {@code true} [value]. |

### equals {#equals-java.lang.Object-}
Determines that the specified object is equal to the current object.

### getValue {#getValue--}
```
public final boolean getValue()
```

Gets the value. Value: The value.

**Returns:**
boolean value

### hashCode {#hashCode--}
```
public int hashCode()
```

Get hashcode for current object.

**Returns:**
A hash code for current object.

### toCosPdfBoolean {#toCosPdfBoolean--}
```
public CosPdfBoolean toCosPdfBoolean()
```

Tries cast this instance to {@code CosPdfBoolean}.

**Returns:**
null if instance is not {@code CosPdfBoolean} else {@code CosPdfBoolean}.

### toString {#toString--}
```
public String toString()
```

Returns a {@link String} that represents the current {@link CosPdfBoolean}.

**Returns:**
A {@link String} that represents the current {@link CosPdfBoolean}.
