NullableBool
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() | Initializes a new instance of the @{code NullableBool} class. |
| NullableBool(boolean value) | Initializes a new instance of the NullableBool struct with the specified boolean value. |
| NullableBool(boolean value, boolean isDefined) | Initializes a new instance of the NullableBool struct. |
Methods
| Method | Description |
|---|---|
| Clone() | Creates and returns a deep copy of this instance. |
| CloneTo(NullableBool that) | Makes a deep copy of the instance into another instance. |
| clone() | {@inheritDoc} |
| equals(NullableBool other) | Returns a flag indicating whether this instance is equal to the specified instance of the NullableBool class. |
| equals(NullableBool obj1, NullableBool obj2) | Returns a value indicating whether specified obj1 instance is equal to the specified obj2 instance. |
| equals(Object obj) | Returns a flag indicating whether this instance is equal to the specified object. |
| getValue() | Gets a value indicating whether current value is true or false. |
| hashCode() | Returns a hash code value for the instance of the NullableBool class. |
| isDefined() | Gets a value indicating whether the value was defined; otherwise, false. |
| op_Equality(NullableBool a, NullableBool b) | Returns a value indicating whether this instance is equal to a specified object. |
| op_Inequality(NullableBool a, NullableBool b) | Returns a value indicating whether this instance is not equal to a specified object. |
| setValue(boolean value) | Sets a value indicating whether current value is true or false. |
| toString() | Returns a string that represents the current object. |
| to_Boolean(NullableBool val) | Implicitly converts a NullableBool instance to a boolean value. |
| to_NullableBool(boolean val) | Implicitly converts boolean value to the NullableBool instance. |
NullableBool()
public NullableBool()
Initializes a new instance of the @{code NullableBool} class.
NullableBool(boolean value)
public NullableBool(boolean value)
Initializes a new instance of the NullableBool struct with the specified boolean value.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | the specified boolean value. |
NullableBool(boolean value, boolean isDefined)
public NullableBool(boolean value, boolean isDefined)
Initializes a new instance of the NullableBool struct.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | The current value. |
| isDefined | boolean | The value indicating whether current value is defined. |
Clone()
public NullableBool Clone()
Creates and returns a deep copy of this instance.
Returns: NullableBool - a deep copy of this object.
CloneTo(NullableBool that)
public void CloneTo(NullableBool that)
Makes a deep copy of the instance into another instance.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| that | NullableBool | another instance. |
clone()
public Object clone()
Returns: java.lang.Object - {@inheritDoc}
equals(NullableBool other)
public final boolean equals(NullableBool other)
Returns a flag indicating whether this instance is equal to the specified instance of the NullableBool class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | 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 class.
equals(NullableBool obj1, NullableBool obj2)
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 | the first object to compare. |
| obj2 | 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)
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()
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()
public int hashCode()
Returns a hash code value for the instance of the NullableBool class.
Returns: int - returns a hash code value for this object.
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)
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 | The first NullableBool. |
| b | NullableBool | The second NullableBool. |
Returns: boolean - a value indicating whether this instance is equal to a specified object
op_Inequality(NullableBool a, NullableBool b)
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 | The first NullableBool. |
| b | NullableBool | The second NullableBool. |
Returns: boolean - a value indicating whether this instance is not equal to a specified object
setValue(boolean value)
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()
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)
public static boolean to_Boolean(NullableBool val)
Implicitly converts a NullableBool instance to a boolean value. Returns true when Value(getValue()/setValue(boolean)) is true and IsDefined(isDefined) is true.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| val | NullableBool | The value to convert. |
Returns: boolean - a boolean value.
to_NullableBool(boolean val)
public static NullableBool to_NullableBool(boolean val)
Implicitly converts boolean value to the NullableBool instance.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| val | boolean | Value to convert. |
Returns: NullableBool - Converted NullableBool instance.