The standard type Boolean represents the common true/false values. Boolean is itself an instance of the metatype PrimitiveType (from UML).
conformsTo
OclAny
Operations
=(object2 : OclSelf[?]) : Boolean[1]
precedence:
EQUALITY
Returns
true
if the logical value of
self
is the same as the numeric value of object2,
false
otherwise.
<>(object2 : OclSelf[?]) : Boolean[1]
precedence:
EQUALITY
Returns
true
if the logical value of
self
is the not same as the numeric value of object2,
false
otherwise.
allInstances() : Set(OclSelf)
Returns
Set{false, true}
.
and(b : Boolean[?]) : Boolean[?] invalidating validating
precedence:
AND
false
if either
self
or
b
is
false
.
Otherwise
invalid
if either
self
or
b
is
invalid
.
Otherwise
null
if either
self
or
b
is
null
.
Otherwise
true
.
body: if self.oclIsInvalid() then
if b.oclIsInvalid() then self
elseif b = false then false
else self
endif
elseif self = false then false
elseif b.oclIsInvalid() then b
elseif b = false then false
elseif self = null then null
elseif b = null then null
else true
endif
and2(b : Boolean[?]) : Boolean[?]
false
if either
self
or
b
is
false
.
Otherwise
true
.
body: if self = false then false
elseif b = false then false
else true
endif
implies(b : Boolean[?]) : Boolean[?] invalidating validating
precedence:
IMPLIES
true
if
self
is
false
, or if
b
is
true
.
Otherwise
invalid
if either
self
or
b
is
invalid
.
Otherwise
null
if either
self
or
b
is
null
.
Otherwise
false
.
body: if self.oclIsInvalid() then
if b.oclIsInvalid() then self
elseif b = true then true
else self
endif
elseif self = false then true
elseif b.oclIsInvalid() then b
elseif b = true then true
elseif self = null then null
elseif b = null then b
else false
endif
implies2(b : Boolean[?]) : Boolean[?]
true
if
self
is
false
, or if
b
is
true
.
Otherwise
false
.
body: if self = false then true
elseif b = true then true
else false
endif
not() : Boolean[?] validating
precedence:
UNARY
true
if
self
is
false
.
false
if
self
is
true
.
null
if
self
is
null
.
Otherwise
invalid
.
body: if self.oclIsInvalid() then self
elseif self = null then null
else self = false
endif
not2() : Boolean[1]
true
if
self
is
false
.
Otherwise
false
.
body: if self then false else true endif
or(b : Boolean[?]) : Boolean[?] invalidating validating
precedence:
OR
true
if either
self
or
b
is
true
.
Otherwise
invalid
if either
self
or
b
is
invalid
.
Otherwise
null
if either
self
or
b
is
null
.
Otherwise
false
.
body: if self.oclIsInvalid() then
if b.oclIsInvalid() then self
elseif b = true then true
else self
endif
elseif self = true then true
elseif b.oclIsInvalid() then b
elseif b = true then true
elseif self = null then null
elseif b = null then null
else false
endif
or2(b : Boolean[?]) : Boolean[?]
true
if either
self
or
b
is
true
.
Otherwise
false
.
body: if self = true then true
elseif b = true then true
else false
endif
toString() : String[1]
Converts
self
to a string value.
xor(b : Boolean[?]) : Boolean[?]
precedence:
XOR
true
if
self
is
true
and
b
is
false
, or if
self
is
false
and
b
is
true
.
false
if
self
is
true
and
b
is
true
, or if
self
is
false
and
b
is
false
.
Otherwise
invalid
if either
self
or
b
is
invalid
.
Otherwise
null
.
body: if self.oclIsInvalid() then self
elseif b.oclIsInvalid() then b
elseif self = null then null
elseif b = null then null
else self <> b
endif
xor2(b : Boolean[?]) : Boolean[?]
true
if
self
<>
b
Otherwise
false
.
body: self <> b