Class NullableBool
- java.lang.Object
-
- com.aspose.ms.System.ValueType<T>
-
- com.aspose.ms.lang.Struct<NullableBool>
-
- com.aspose.tasks.NullableBool
-
- All Implemented Interfaces:
com.aspose.ms.System.IEquatable<NullableBool>
public class NullableBool extends com.aspose.ms.lang.Struct<NullableBool> implements com.aspose.ms.System.IEquatable<NullableBool>
A class for boolean values with possibility to check whether the value was defined or not.
-
-
Constructor Summary
Constructors Constructor Description NullableBool()
Initializes a new instance of the @{code NullableBool} class.NullableBool(boolean value)
Initializes a new instance of theNullableBool
struct with the specified boolean value.NullableBool(boolean value, boolean isDefined)
Initializes a new instance of theNullableBool
struct.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
NullableBool
Clone()
Creates and returns a deep copy of this instance.void
CloneTo(NullableBool that)
Makes a deep copy of the instance into another instance.boolean
equals(NullableBool other)
Returns a flag indicating whether this instance is equal to the specified instance of theNullableBool
class.static boolean
equals(NullableBool obj1, NullableBool obj2)
Returns a value indicating whether specifiedobj1
instance is equal to the specifiedobj2
instance.boolean
equals(Object obj)
Returns a flag indicating whether this instance is equal to the specified object.boolean
getValue()
Gets a value indicating whether current value is true or false.int
hashCode()
Returns a hash code value for the instance of theNullableBool
class.boolean
isDefined()
Gets a value indicating whether the value was defined; otherwise, false.static boolean
op_Equality(NullableBool a, NullableBool b)
Returns a value indicating whether this instance is equal to a specified object.static boolean
op_Inequality(NullableBool a, NullableBool b)
Returns a value indicating whether this instance is not equal to a specified object.void
setValue(boolean value)
Sets a value indicating whether current value is true or false.static boolean
to_Boolean(NullableBool val)
Implicitly converts aNullableBool
instance to a boolean value.static NullableBool
to_NullableBool(boolean val)
Implicitly converts boolean value to theNullableBool
instance.String
toString()
Returns a string that represents the current object.
-
-
-
Constructor Detail
-
NullableBool
public NullableBool()
Initializes a new instance of the @{code NullableBool} class.
-
NullableBool
public NullableBool(boolean value)
Initializes a new instance of the
NullableBool
struct with the specified boolean value.- Parameters:
value
- the specified boolean value.
-
NullableBool
public NullableBool(boolean value, boolean isDefined)
Initializes a new instance of the
NullableBool
struct.- Parameters:
value
- The current value.isDefined
- The value indicating whether current value is defined.
-
-
Method Detail
-
Clone
public NullableBool Clone()
Creates and returns a deep copy of this instance.- Specified by:
Clone
in classcom.aspose.ms.System.ValueType<NullableBool>
- Returns:
- a deep copy of this object.
-
CloneTo
public void CloneTo(NullableBool that)
Makes a deep copy of the instance into another instance.- Specified by:
CloneTo
in classcom.aspose.ms.System.ValueType<NullableBool>
- Parameters:
that
- another instance.
-
clone
public Object clone()
- Returns:
-
equals
public final boolean equals(NullableBool other)
Returns a flag indicating whether this instance is equal to the specified instance of the
NullableBool
class.- Parameters:
other
- the specified object to compare to this instance.- Returns:
- a flag indicating whether this instance is equal to the specified instance of the
NullableBool
class.
-
equals
public boolean equals(Object obj)
Returns a flag indicating whether this instance is equal to the specified object.
- Specified by:
equals
in interfacecom.aspose.ms.System.IEquatable<NullableBool>
- Overrides:
equals
in classObject
- Parameters:
obj
- the specified object to compare to this instance.- Returns:
- a flag indicating whether this instance is equal to the specified object.
-
equals
public static boolean equals(NullableBool obj1, NullableBool obj2)
Returns a value indicating whether specifiedobj1
instance is equal to the specifiedobj2
instance.- Parameters:
obj1
- the first object to compare.obj2
- the second object to compare.- Returns:
- returns true if specified
obj1
instance is equal to the specifiedobj2
instance; otherwise, false.
-
getValue
public final boolean getValue()
Gets a value indicating whether current value is true or false.
- Returns:
- a value indicating whether current value is true or false.
-
setValue
public final void setValue(boolean value)
Sets a value indicating whether current value is true or false.
- Parameters:
value
- 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.
-
isDefined
public final boolean isDefined()
Gets a value indicating whether the value was defined; otherwise, false.
- Returns:
- a value indicating whether the value was defined; otherwise, false.
-
op_Equality
public static boolean op_Equality(NullableBool a, NullableBool b)
Returns a value indicating whether this instance is equal to a specified object.
- Parameters:
a
- The firstNullableBool
.b
- The secondNullableBool
.- Returns:
- a value indicating whether this instance is equal to a specified object
-
op_Inequality
public static boolean op_Inequality(NullableBool a, NullableBool b)
Returns a value indicating whether this instance is not equal to a specified object.
- Parameters:
a
- The firstNullableBool
.b
- The secondNullableBool
.- Returns:
- a value indicating whether this instance is not equal to a specified object
-
toString
public String toString()
Returns a string that represents the current object.
-
to_Boolean
public static boolean to_Boolean(NullableBool val)
Implicitly converts a
NullableBool
instance to a boolean value. Returns true whenValue
(getValue()
/setValue(boolean)
) is true andIsDefined
(isDefined
) is true.- Parameters:
val
- The value to convert.- Returns:
- a boolean value.
-
to_NullableBool
public static NullableBool to_NullableBool(boolean val)
Implicitly converts boolean value to the
NullableBool
instance.- Parameters:
val
- Value to convert.- Returns:
- Converted
NullableBool
instance.
-
-