A boolean object.
Operation | Return | Description |
not |
boolean |
Answers a boolean being the logical NOT operator applied to the receiver |
& aBoolean |
boolean |
Answers a boolean being the receiver AND aBoolean |
| aBoolean |
boolean |
Answers a boolean being the receiver OR aBoolean |
random |
boolean |
Answers with a random boolean value |
and: aBlock |
boolean |
Answers a boolean being the receiver AND the value of aBlock if the receiver is true. The block is not evaluated if the receiver is false. The block must return a boolean. |
or: aBlock |
boolean |
Answers a boolean being the receiver OR the value of aBlock if the receiver is false. The block is not evaluated if the receiver is true. The block must return a boolean. |
ifTrue: aBlock |
P2Object |
Executes aBlock if the receiver is true. Answers the value of aBlock or Nil. No arguments are given to the block. |
ifFalse: aBlock |
P2Object |
Executes aBlock if the receiver is false. Answers the value of aBlock or Nil. No arguments are given to the block. |
ifTrue: aBlockTrue ifFalse: aBlockFalse |
P2Object |
Executes aBlockTrue if the receiver is true otherwise aBlockFalse is executed. Answers the return value of the block that is executed. No arguments are given to the block to be executed. |
ifFalse: aBlockFalse ifTrue: aBlockTrue |
P2Object |
Executes aBlockFalse if the receiver is false otherwise aBlockTrue is executed. Answers the return value of the block that is executed. No arguments are given to the block to be executed. |