
**Inheritance:**
java.lang.Object, com.aspose.ms.System.ValueType, com.aspose.ms.lang.Struct

**All Implemented Interfaces:**
com.aspose.ms.System.IEquatable
```
public class NullableBool extends Struct<NullableBool> implements System.IEquatable<NullableBool>
```

A class for boolean values with possibility to check whether the value was defined or not.
## Constructors

| Constructor | Description |
| --- | --- |
| [NullableBool()](#NullableBool--) | Initializes a new instance of the @\{code NullableBool\} class. |
| [NullableBool(boolean value)](#NullableBool-boolean-) | Initializes a new instance of the [NullableBool](../../com.aspose.tasks/nullablebool) struct with the specified boolean value. |
| [NullableBool(boolean value, boolean isDefined)](#NullableBool-boolean-boolean-) | Initializes a new instance of the [NullableBool](../../com.aspose.tasks/nullablebool) struct. |
## Methods

| Method | Description |
| --- | --- |
| [Clone()](#Clone--) | Creates and returns a deep copy of this instance. |
| [CloneTo(NullableBool that)](#CloneTo-com.aspose.tasks.NullableBool-) | Makes a deep copy of the instance into another instance. |
| [clone()](#clone--) | \{@inheritDoc\} |
| [equals(NullableBool other)](#equals-com.aspose.tasks.NullableBool-) | Returns a flag indicating whether this instance is equal to the specified instance of the [NullableBool](../../com.aspose.tasks/nullablebool) class. |
| [equals(NullableBool obj1, NullableBool obj2)](#equals-com.aspose.tasks.NullableBool-com.aspose.tasks.NullableBool-) | Returns a value indicating whether specified `obj1` instance is equal to the specified `obj2` instance. |
| [equals(Object obj)](#equals-java.lang.Object-) | Returns a flag indicating whether this instance is equal to the specified object. |
| [getValue()](#getValue--) | Gets a value indicating whether current value is true or false. |
| [hashCode()](#hashCode--) | Returns a hash code value for the instance of the [NullableBool](../../com.aspose.tasks/nullablebool) class. |
| [isDefined()](#isDefined--) | Gets a value indicating whether the value was defined; otherwise, false. |
| [op_Equality(NullableBool a, NullableBool b)](#op-Equality-com.aspose.tasks.NullableBool-com.aspose.tasks.NullableBool-) | Returns a value indicating whether this instance is equal to a specified object. |
| [op_Inequality(NullableBool a, NullableBool b)](#op-Inequality-com.aspose.tasks.NullableBool-com.aspose.tasks.NullableBool-) | Returns a value indicating whether this instance is not equal to a specified object. |
| [setValue(boolean value)](#setValue-boolean-) | Sets a value indicating whether current value is true or false. |
| [toString()](#toString--) | Returns a string that represents the current object. |
| [to_Boolean(NullableBool val)](#to-Boolean-com.aspose.tasks.NullableBool-) | Implicitly converts a [NullableBool](../../com.aspose.tasks/nullablebool) instance to a boolean value. |
| [to_NullableBool(boolean val)](#to-NullableBool-boolean-) | Implicitly converts boolean value to the [NullableBool](../../com.aspose.tasks/nullablebool) instance. |
### NullableBool() {#NullableBool--}
```
public NullableBool()
```


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

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


Initializes a new instance of the [NullableBool](../../com.aspose.tasks/nullablebool) struct with the specified boolean value.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | boolean | the specified boolean value. |

### NullableBool(boolean value, boolean isDefined) {#NullableBool-boolean-boolean-}
```
public NullableBool(boolean value, boolean isDefined)
```


Initializes a new instance of the [NullableBool](../../com.aspose.tasks/nullablebool) struct.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | boolean | The current value. |
| isDefined | boolean | The value indicating whether current value is defined. |

### Clone() {#Clone--}
```
public NullableBool Clone()
```


Creates and returns a deep copy of this instance.

**Returns:**
[NullableBool](../../com.aspose.tasks/nullablebool) - a deep copy of this object.
### CloneTo(NullableBool that) {#CloneTo-com.aspose.tasks.NullableBool-}
```
public void CloneTo(NullableBool that)
```


Makes a deep copy of the instance into another instance.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| that | [NullableBool](../../com.aspose.tasks/nullablebool) | another instance. |

### clone() {#clone--}
```
public Object clone()
```




**Returns:**
java.lang.Object - \{@inheritDoc\}
### equals(NullableBool other) {#equals-com.aspose.tasks.NullableBool-}
```
public final boolean equals(NullableBool other)
```


Returns a flag indicating whether this instance is equal to the specified instance of the [NullableBool](../../com.aspose.tasks/nullablebool) class.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| other | [NullableBool](../../com.aspose.tasks/nullablebool) | the specified object to compare to this instance. |

**Returns:**
boolean - a flag indicating whether this instance is equal to the specified instance of the [NullableBool](../../com.aspose.tasks/nullablebool) class.
### equals(NullableBool obj1, NullableBool obj2) {#equals-com.aspose.tasks.NullableBool-com.aspose.tasks.NullableBool-}
```
public static boolean equals(NullableBool obj1, NullableBool obj2)
```


Returns a value indicating whether specified `obj1` instance is equal to the specified `obj2` instance.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| obj1 | [NullableBool](../../com.aspose.tasks/nullablebool) | the first object to compare. |
| obj2 | [NullableBool](../../com.aspose.tasks/nullablebool) | the second object to compare. |

**Returns:**
boolean - returns true if specified `obj1` instance is equal to the specified `obj2` instance; otherwise, false.
### equals(Object obj) {#equals-java.lang.Object-}
```
public boolean equals(Object obj)
```


Returns a flag indicating whether this instance is equal to the specified object.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| obj | java.lang.Object | the specified object to compare to this instance. |

**Returns:**
boolean - a flag indicating whether this instance is equal to the specified object.
### getValue() {#getValue--}
```
public final boolean getValue()
```


Gets a value indicating whether current value is true or false.

**Returns:**
boolean - a value indicating whether current value is true or false.
### hashCode() {#hashCode--}
```
public int hashCode()
```


Returns a hash code value for the instance of the [NullableBool](../../com.aspose.tasks/nullablebool) class.

**Returns:**
int - returns a hash code value for this object.
### isDefined() {#isDefined--}
```
public final boolean isDefined()
```


Gets a value indicating whether the value was defined; otherwise, false.

**Returns:**
boolean - a value indicating whether the value was defined; otherwise, false.
### op_Equality(NullableBool a, NullableBool b) {#op-Equality-com.aspose.tasks.NullableBool-com.aspose.tasks.NullableBool-}
```
public static boolean op_Equality(NullableBool a, NullableBool b)
```


Returns a value indicating whether this instance is equal to a specified object.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| a | [NullableBool](../../com.aspose.tasks/nullablebool) | The first [NullableBool](../../com.aspose.tasks/nullablebool). |
| b | [NullableBool](../../com.aspose.tasks/nullablebool) | The second [NullableBool](../../com.aspose.tasks/nullablebool). |

**Returns:**
boolean - a value indicating whether this instance is equal to a specified object
### op_Inequality(NullableBool a, NullableBool b) {#op-Inequality-com.aspose.tasks.NullableBool-com.aspose.tasks.NullableBool-}
```
public static boolean op_Inequality(NullableBool a, NullableBool b)
```


Returns a value indicating whether this instance is not equal to a specified object.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| a | [NullableBool](../../com.aspose.tasks/nullablebool) | The first [NullableBool](../../com.aspose.tasks/nullablebool). |
| b | [NullableBool](../../com.aspose.tasks/nullablebool) | The second [NullableBool](../../com.aspose.tasks/nullablebool). |

**Returns:**
boolean - a value indicating whether this instance is not equal to a specified object
### setValue(boolean value) {#setValue-boolean-}
```
public final void setValue(boolean value)
```


Sets a value indicating whether current value is true or false.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | boolean | a value indicating whether current value is true or false. |

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


Returns a string that represents the current object.

**Returns:**
java.lang.String - A string that represents the current object.
### to_Boolean(NullableBool val) {#to-Boolean-com.aspose.tasks.NullableBool-}
```
public static boolean to_Boolean(NullableBool val)
```


Implicitly converts a [NullableBool](../../com.aspose.tasks/nullablebool) instance to a boolean value. Returns true when `Value`([getValue()](../../com.aspose.tasks/nullablebool\#getValue--)/[setValue(boolean)](../../com.aspose.tasks/nullablebool\#setValue-boolean-)) is true and `IsDefined`([isDefined](../../com.aspose.tasks/nullablebool\#isDefined)) is true.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| val | [NullableBool](../../com.aspose.tasks/nullablebool) | The value to convert. |

**Returns:**
boolean - a boolean value.
### to_NullableBool(boolean val) {#to-NullableBool-boolean-}
```
public static NullableBool to_NullableBool(boolean val)
```


Implicitly converts boolean value to the [NullableBool](../../com.aspose.tasks/nullablebool) instance.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| val | boolean | Value to convert. |

**Returns:**
[NullableBool](../../com.aspose.tasks/nullablebool) - Converted [NullableBool](../../com.aspose.tasks/nullablebool) instance.
