P2Boolean

A boolean object.

Factory Messages

Operational Messages

& aBoolean

Answers a boolean being the receiver AND aBoolean

and: aBlock

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.

ifFalse: aBlock

Executes aBlock if the receiver is false. Answers the value of aBlock or Nil. No arguments are given to the block.

ifFalse: aBlockFalse ifTrue: aBlockTrue

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.

ifTrue: aBlock

Executes aBlock if the receiver is true. Answers the value of aBlock or Nil. No arguments are given to the block.

ifTrue: aBlockTrue ifFalse: aBlockFalse

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.

| aBoolean

Answers a boolean being the receiver OR aBoolean

or: aBlock

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.