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
precedence:
EQUALITY
Returns
true
if the logical value of
self
is the same as the numeric value of object2,
false
otherwise.
<>(object2 : OclSelf) : Boolean
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
else if b = false then false
else self
endif endif
else if self = false then false
else if b.oclIsInvalid() then b
else if b = false then false
else if self = null then null
else if b = null then null
else true
endif endif endif endif endif 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
else if b = true then true
else self
endif endif
else if self = false then true
else if b.oclIsInvalid() then b
else if b = true then true
else if self = null then null
else if b = null then b
else false
endif endif endif endif endif endif
not() : Boolean[?]
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
else if self = null then null
else self = false
endif 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
else if b = true then true
else self
endif endif
else if self = true then true
else if b.oclIsInvalid() then b
else if b = true then true
else if self = null then null
else if b = null then null
else false
endif endif endif endif endif endif
toString() : String
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 = null then null
else if b = null then null
else self <> b
endif endif