Squeak Class Documentation category index | class index  
 
Boolean
  category: Kernel-Objects
  superclass: Object
  subclasses: True False

Boolean is an abstract class defining the protocol for logic testing operations and conditional control structures for the logical values represented by the instances of its subclasses True and False.

Boolean redefines #new so no instances of Boolean can be created. It also redefines several messages in the 'copying' protocol to ensure that only one instance of each of its subclasses True (the global true, logical assertion) and False (the global false, logical negation) ever exist in the system.

instance methods
  controlling
  and:
and:and:
and:and:and:
and:and:and:and:
ifFalse:
ifFalse:ifTrue:
ifTrue:
ifTrue:ifFalse:
or:
or:or:
or:or:or:
or:or:or:or:

  copying
  clone
deepCopy
shallowCopy
veryDeepCopyWith:

  logical operations
  &
eqv:
not
xor:
|

  misc
  newTileMorphRepresentative

  printing
  basicType
storeOn:

class methods
  instance creation
  initializedInstance
new

  plugin generation
  ccg:emitLoadFor:from:on:
ccg:generateCoerceToOopFrom:on:
ccg:generateCoerceToValueFrom:on:
ccg:prolog:expr:index:

instance methods
  controlling top  
 

and:

Nonevaluating conjunction. If the receiver is true, answer the value of
the argument, alternativeBlock; otherwise answer false without
evaluating the argument.


 

and:and:

Nonevaluating conjunction without deep nesting.
The reciever is evaluated, followed by the blocks in order.
If any of these evaluates as false, then return false immediately,
without evaluating any further blocks.
If all return true, then return true.


 

and:and:and:

Nonevaluating conjunction without deep nesting.
The reciever is evaluated, followed by the blocks in order.
If any of these evaluates as false, then return false immediately,
without evaluating any further blocks.
If all return true, then return true.


 

and:and:and:and:

Nonevaluating conjunction without deep nesting.
The reciever is evaluated, followed by the blocks in order.
If any of these evaluates as false, then return false immediately,
without evaluating any further blocks.
If all return true, then return true.


 

ifFalse:

If the receiver is true (i.e., the condition is true), then the value is the
true alternative, which is nil. Otherwise answer the result of evaluating
the argument, alternativeBlock. Create an error notification if the
receiver is nonBoolean. Execution does not actually reach here because
the expression is compiled in-line.


 

ifFalse:ifTrue:

Same as ifTrue:ifFalse:.


 

ifTrue:

If the receiver is false (i.e., the condition is false), then the value is the
false alternative, which is nil. Otherwise answer the result of evaluating
the argument, alternativeBlock. Create an error notification if the
receiver is nonBoolean. Execution does not actually reach here because
the expression is compiled in-line.


 

ifTrue:ifFalse:

If the receiver is true (i.e., the condition is true), then answer the value
of the argument trueAlternativeBlock. If the receiver is false, answer the
result of evaluating the argument falseAlternativeBlock. If the receiver
is a nonBoolean then create an error notification. Execution does not
actually reach here because the expression is compiled in-line.


 

or:

Nonevaluating disjunction. If the receiver is false, answer the value of
the argument, alternativeBlock; otherwise answer true without
evaluating the argument.


 

or:or:

Nonevaluating alternation without deep nesting.
The reciever is evaluated, followed by the blocks in order.
If any of these evaluates as true, then return true immediately,
without evaluating any further blocks.
If all return false, then return false.


 

or:or:or:

Nonevaluating alternation without deep nesting.
The reciever is evaluated, followed by the blocks in order.
If any of these evaluates as true, then return true immediately,
without evaluating any further blocks.
If all return false, then return false.


 

or:or:or:or:

Nonevaluating alternation without deep nesting.
The reciever is evaluated, followed by the blocks in order.
If any of these evaluates as true, then return true immediately,
without evaluating any further blocks.
If all return false, then return false.


  copying top  
 

clone

Receiver has two concrete subclasses, True and False.
Only one instance of each should be made, so return self.


 

deepCopy

Receiver has two concrete subclasses, True and False.
Only one instance of each should be made, so return self.


 

shallowCopy

Receiver has two concrete subclasses, True and False.
Only one instance of each should be made, so return self.


 

veryDeepCopyWith:

Return self. I can't be copied. Do not record me.


  logical operations top  
 

&

Evaluating conjunction. Evaluate the argument. Then answer true if
both the receiver and the argument are true.


 

eqv:

Answer true if the receiver is equivalent to aBoolean.


 

not

Negation. Answer true if the receiver is false, answer false if the
receiver is true.


 

xor:

Exclusive OR. Answer true if the receiver is not equivalent to aBoolean.


 

|

Evaluating disjunction (OR). Evaluate the argument. Then answer true
if either the receiver or the argument is true.


  misc top  
 

newTileMorphRepresentative


  printing top  
 

basicType

Answer a symbol representing the inherent type of the receiver


 

storeOn:

Refer to the comment in Object|storeOn:.


class methods
  instance creation top  
 

initializedInstance

Answer an instance of the receiver which in some sense is initialized. In the case of Morphs, this will yield an instance that can be attached to the Hand after having received the same kind of basic initialization that would be obtained from an instance chosen from the 'new morph' menu. Return nil if the receiver is reluctant for some reason to return such a thing


 

new

Answer a new instance of the receiver (which is a class) with no indexable variables. Fail if the class is indexable.


  plugin generation top  
 

ccg:emitLoadFor:from:on:


 

ccg:generateCoerceToOopFrom:on:


 

ccg:generateCoerceToValueFrom:on:


 

ccg:prolog:expr:index: