Represents a three-valued logic value.
More...
|
| override int | GetHashCode () |
| | Gets the hash code for the current instance.
|
| override string | ToString () |
| | Returns a string that represents the current instance.
|
| | Triple () |
| | Initializes a new instance of the Triple struct.
|
| | Triple (bool v) |
| | Initializes a new instance of the Triple struct.
|
| | Triple (triple v) |
| | Initializes a new instance of the Triple struct.
|
| override bool | Equals ([NotNullWhen(true)] object? obj) |
| | Determines whether the current instance and a specified object are equal.
|
| bool | Equals (bool obj) |
| | Determines whether the current instance and a specified boolean value are equal.
|
| bool | ToBoolean () |
| | Returns the boolean value of the current instance.
|
| bool | Equals (triple obj) |
| | Determines whether the current instance and a specified triple value are equal.
|
|
| static bool | operator== (Triple left, Triple right) |
| | Determines whether two instances of the Triple struct are equal.
|
| static bool | operator== (Triple left, bool right) |
| | Determines whether an instance of the Triple struct and a boolean value are equal.
|
| static bool | operator== (bool left, Triple right) |
| | Determines whether a boolean value and an instance of the Triple struct are equal.
|
| static bool | operator!= (Triple left, Triple right) |
| | Determines whether two instances of the Triple struct are not equal.
|
| static bool | operator!= (Triple left, bool right) |
| | Determines whether an instance of the Triple struct and a boolean value are not equal.
|
| static bool | operator!= (bool left, Triple right) |
| | Determines whether a boolean value and an instance of the Triple struct are not equal.
|
|
| static readonly string | TrueString = "True" |
| | Gets the string representation for the true value.
|
| static readonly string | FalseString = "False" |
| | Gets the string representation for the false value.
|
| static readonly string | NinString = "Nin" |
| | Gets the string representation for the neither true nor false value.
|
Represents a three-valued logic value.
◆ Triple() [1/3]
| SystemEx.Triple.Triple |
( |
| ) |
|
Initializes a new instance of the Triple struct.
93 {
95 }
triple
Represents a three-valued logic type with True, False, and Nin (neither true nor false) states.
Definition Base/Triple.cs:23
◆ Triple() [2/3]
| SystemEx.Triple.Triple |
( |
bool | v | ) |
|
Initializes a new instance of the Triple struct.
- Parameters
-
| v | The boolean value to initialize with. |
100 {
101 m_value = v ? triple.True :
triple.False;
102 }
◆ Triple() [3/3]
| SystemEx.Triple.Triple |
( |
triple | v | ) |
|
Initializes a new instance of the Triple struct.
- Parameters
-
| v | The triple value to initialize with. |
107 {
108 m_value = v;
109 }
◆ Equals() [1/3]
| override bool SystemEx.Triple.Equals |
( |
[NotNullWhen(true)] object? | obj | ) |
|
Determines whether the current instance and a specified object are equal.
- Parameters
-
| obj | The object to compare with the current instance. |
- Returns
- true if the current instance and obj are equal; otherwise, false.
116 {
117 bool _ret = false;
118
119 if( (obj is Boolean) ) _ret = ((Boolean)obj == this.ToBoolean());
120 else if ( (obj is Triple) ) _ret = m_value == ((Triple)obj).m_value;
121
122 return _ret;
123 }
◆ Equals() [2/3]
| bool SystemEx.Triple.Equals |
( |
bool | obj | ) |
|
Determines whether the current instance and a specified boolean value are equal.
- Parameters
-
| obj | The boolean value to compare with the current instance. |
- Returns
- true if the current instance and obj are equal; otherwise, false.
131 {
132 return ToBoolean() == obj;
133 }
◆ Equals() [3/3]
| bool SystemEx.Triple.Equals |
( |
triple | obj | ) |
|
Determines whether the current instance and a specified triple value are equal.
- Parameters
-
| obj | The triple value to compare with the current instance. |
- Returns
- true if the current instance and obj are equal; otherwise, false.
146 {
147 return m_value == obj;
148 }
◆ GetHashCode()
| override int SystemEx.Triple.GetHashCode |
( |
| ) |
|
Gets the hash code for the current instance.
- Returns
- The hash code.
69 {
70 if ( m_value == True ) return 1;
71 if ( m_value == False ) return 0;
72 return -1;
73 }
◆ operator!=() [1/3]
| bool SystemEx.Triple.operator!= |
( |
bool | left, |
|
|
Triple | right ) |
|
static |
Determines whether a boolean value and an instance of the Triple struct are not equal.
- Parameters
-
| left | The boolean value to compare. |
| right | The instance of the Triple struct to compare with the boolean value. |
- Returns
- true if the boolean value and the instance are not equal; otherwise, false.
202 {
203 return !(right.Equals(left));
204 }
◆ operator!=() [2/3]
| bool SystemEx.Triple.operator!= |
( |
Triple | left, |
|
|
bool | right ) |
|
static |
Determines whether an instance of the Triple struct and a boolean value are not equal.
- Parameters
-
| left | The instance of the Triple struct to compare. |
| right | The boolean value to compare with the instance. |
- Returns
- true if the instance and the boolean value are not equal; otherwise, false.
193 {
194 return !(left.Equals(right));
195 }
◆ operator!=() [3/3]
| bool SystemEx.Triple.operator!= |
( |
Triple | left, |
|
|
Triple | right ) |
|
static |
Determines whether two instances of the Triple struct are not equal.
- Parameters
-
| left | The first instance to compare. |
| right | The second instance to compare. |
- Returns
- true if the instances are not equal; otherwise, false.
184 {
185 return !(left.Equals(right));
186 }
◆ operator==() [1/3]
| bool SystemEx.Triple.operator== |
( |
bool | left, |
|
|
Triple | right ) |
|
static |
Determines whether a boolean value and an instance of the Triple struct are equal.
- Parameters
-
| left | The boolean value to compare. |
| right | The instance of the Triple struct to compare with the boolean value. |
- Returns
- true if the boolean value and the instance are equal; otherwise, false.
175 {
176 return right.Equals(left);
177 }
◆ operator==() [2/3]
| bool SystemEx.Triple.operator== |
( |
Triple | left, |
|
|
bool | right ) |
|
static |
Determines whether an instance of the Triple struct and a boolean value are equal.
- Parameters
-
| left | The instance of the Triple struct to compare. |
| right | The boolean value to compare with the instance. |
- Returns
- true if the instance and the boolean value are equal; otherwise, false.
165 {
166 return left.Equals(right);
167 }
◆ operator==() [3/3]
| bool SystemEx.Triple.operator== |
( |
Triple | left, |
|
|
Triple | right ) |
|
static |
Determines whether two instances of the Triple struct are equal.
- Parameters
-
| left | The first instance to compare. |
| right | The second instance to compare. |
- Returns
- true if the instances are equal; otherwise, false.
155 {
156 return left.Equals(right);
157 }
◆ ToBoolean()
| bool SystemEx.Triple.ToBoolean |
( |
| ) |
|
Returns the boolean value of the current instance.
- Returns
- The boolean value of the current instance.
138 {
139 return m_value ==
triple.True;
140 }
◆ ToString()
| override string SystemEx.Triple.ToString |
( |
| ) |
|
Returns a string that represents the current instance.
- Returns
- A string that represents the current instance.
79 {
80 string _ret = NinString;
81
82 if ( m_value ==
triple.False) {
83 _ret = FalseString;
84 }
else if ( m_value ==
triple.True )
85 _ret = TrueString;
86
87 return _ret;
88 }
◆ FalseString
| readonly string SystemEx.Triple.FalseString = "False" |
|
static |
Gets the string representation for the false value.
◆ NinString
| readonly string SystemEx.Triple.NinString = "Nin" |
|
static |
Gets the string representation for the neither true nor false value.
◆ TrueString
| readonly string SystemEx.Triple.TrueString = "True" |
|
static |
Gets the string representation for the true value.
The documentation for this struct was generated from the following file: