Vision Messages: Boolean

| Home | Boolean Class | Message XRef | Messages (General) |

Profile of Class Boolean


Includes Classes: Boolean, FALSE, TRUE



Object
  | 
  +--- Boolean
  |      |
  |      +--- FALSE
  |      |
  |      +--- TRUE


The class Boolean provides protocol for logical values. Logical values are represented by the two subclasses of Boolean - TRUE and FALSE. Most of the protocol for booleans is actually implemented at the classes TRUE and FALSE. The actual implementations will differ between the two classes, but the functional goal of a message will be the same.


Message Index

o && aBoolean (FALSE)
o && aBoolean (TRUE)
o asSelf (Boolean)
o asSelf (FALSE)
o asSelf (TRUE)
o classDescriptor (Boolean)
o classDescriptor (FALSE)
o classDescriptor (TRUE)
o convertFrom: string
o defaultInstance (Boolean)
o defaultInstance (FALSE)
o defaultInstance (TRUE)
o ifFalse: aBlock (FALSE)
o ifFalse: aBlock (TRUE)
o ifFalse: block1 else: block2
o ifTrue: aBlock (FALSE)
o ifTrue: aBlock (TRUE)
o ifTrue: block1 else: block2
o ifTrue: aBlock ifFalse: aBlock (FALSE)
o ifTrue: block1 ifFalse: block2 (TRUE)
o ifTrue: block1 ifFalse: block2 else: block3 (FALSE)
o ifTrue: block1 ifFalse: block2 else: block3 (TRUE)
o isBoolean
o isFALSE
o isFalse
o isTRUE
o isTrue
o new
o not (FALSE)
o not (TRUE)
o print: f
o whatAmI (Boolean)
o whatAmI (FALSE)
o whatAmI (TRUE)
o || aBoolean (FALSE)
o || aBoolean (TRUE)


Messages

o &&

Synopsis:
FALSE && aBoolean

Description:

Returns FALSE independent of parameter

Type: Method          Returns: FALSE

Parameters:

1 - Boolean

Also Defined At:
| Undefined |

o &&

Synopsis:
TRUE && aBoolean

Description:

Returns TRUE if parameter is TRUE. Note that if parameter is a block, it is evaluated first.

Type: Method          Returns: Boolean

Parameters:

1 - Boolean

Also Defined At:
| Undefined |

o asSelf

Synopsis:
Boolean asSelf

Description:

Returns the original object.

Type: Primitive          Returns: Boolean

Also Defined At:
| Block | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o asSelf

Synopsis:
FALSE asSelf

Description:

Returns the original object.

Type: Primitive          Returns: FALSE

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o asSelf

Synopsis:
TRUE asSelf

Description:

Returns the original object.

Type: Primitive          Returns: TRUE

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o classDescriptor

Synopsis:
Boolean classDescriptor

Description:

Reference to the object which describes the class. Class level information is stored here.

Type: Constant          Returns: Object

Also Defined At:
| Block | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o classDescriptor

Synopsis:
FALSE classDescriptor

Description:

Reference to the object which describes the class. Class level information is stored here.

Type: Constant          Returns: Object

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o classDescriptor

Synopsis:
TRUE classDescriptor

Description:

Reference to the object which describes the class. Class level information is stored here.

Type: Constant          Returns: Object

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o convertFrom:

Synopsis:
Boolean convertFrom: string

Description:

This message converts the supplied string to an instance of the recipient's class if applicable, returning NA otherwise. The definition at Object will lookup the string in the class' naming dictionary, if defined. The version at String returns the recipient stripped of any extensions. The versions at Number, Integer, Double, and Float convert the recipient to a numeric value if possible. The version at Date converts the recipient to a Date using the 'asDate' message defined at String. The version at Boolean returns TRUE if the recipient contains an upper/lower case combination of 'true' and FALSE if the recipient contains an upper/lower case combination of 'false'. The version at block returns a block containing the string as a message. This message is called by the 'as:' message at String.

Type: Method          Returns: Object

Also Defined At:
| Block | Date | Number | Object | String | Undefined |

o defaultInstance

Synopsis:
Boolean defaultInstance

Description:

Returns the default instance for the recipient's class.

Type: Constant          Returns: String

Also Defined At:
| Block | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o defaultInstance

Synopsis:
FALSE defaultInstance

Description:

Returns the default instance of the recipient object's class

Type: Constant          Returns: FALSE

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o defaultInstance

Synopsis:
TRUE defaultInstance

Description:

Returns the default instance of the recipient object's class

Type: Constant          Returns: TRUE

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o ifFalse:

Synopsis:
FALSE ifFalse: aBlock

Description:

Executes supplied Block.

Type: Primitive          Returns: Object

Parameters:

1 - Block

o ifFalse:

Synopsis:
TRUE ifFalse: aBlock

Description:

Never executes.

Type: Constant          Returns: Undefined

Parameters:

1 - Block

o ifFalse:else:

Synopsis:
FALSE ifFalse: block1 else: block2

Description:

Executes supplied FALSE block.

Type: Method          Returns: Object

Parameters:

1 - Block
2 - Block

Also Defined At:
| Object |

o ifTrue:

Synopsis:
FALSE ifTrue: aBlock

Description:

Never executes.

Type: Constant          Returns: Undefined

Parameters:

1 - Block

o ifTrue:

Synopsis:
TRUE ifTrue: aBlock

Description:

Executes supplied Block

Type: Primitive          Returns: Object

Parameters:

1 - Block

o ifTrue:else:

Synopsis:
TRUE ifTrue: block1 else: block2

Description:

Executes supplied TRUE block.

Type: Method          Returns: Object

Parameters:

1 - Block
2 - Block

Also Defined At:
| Object |

o ifTrue:ifFalse:

Synopsis:
FALSE ifTrue: aBlock ifFalse: aBlock

Description:

Executes supplied 'False' Block.

Type: Primitive          Returns: Object

Parameters:

1 - Block
2 - Block

o ifTrue:ifFalse:

Synopsis:
TRUE ifTrue: block1 ifFalse: block2

Description:

Executes supplied TRUE block.

Type: Primitive          Returns: Object

Parameters:

1 - Block
2 - Block

o ifTrue:ifFalse:else:

Synopsis:
FALSE ifTrue: block1 ifFalse: block2 else: block3

Description:

Executes supplied FALSE block.

Type: Method          Returns: Object

Parameters:

1 - Block
2 - Block
3 - Block

Also Defined At:
| Object |

o ifTrue:ifFalse:else:

Synopsis:
TRUE ifTrue: block1 ifFalse: block2 else: block3

Description:

Executes supplied TRUE block.

Type: Method          Returns: Object

Parameters:

1 - Block
2 - Block
3 - Block

Also Defined At:
| Object |

o isBoolean

Synopsis:
Boolean isBoolean

Description:

Returns a TRUE value when sent to any boolean.

Type: Constant          Returns: TRUE

Also Defined At:
| Object |

o isFALSE

Synopsis:
FALSE isFALSE

Description:

Returns the string 'TRUE'

Type: Constant          Returns: TRUE

Also Defined At:
| Object |

o isFalse

Synopsis:
FALSE isFalse

Description:

Returns False unless object is the Boolean value False.

Type: Constant          Returns: TRUE

Also Defined At:
| Object |

o isTRUE

Synopsis:
TRUE isTRUE

Description:

Returns the String 'TRUE' when sent to TRUE.

Type: Constant          Returns: TRUE

Also Defined At:
| Object |

o isTrue

Synopsis:
TRUE isTrue

Description:

Returns False unless object is the Boolean value TRUE.

Type: Constant          Returns: TRUE

Also Defined At:
| Object |

o new

Synopsis:
Boolean new

Description:

Invalidates the 'new' message' which is not valid for this class

Type: Method          Returns: Boolean

Also Defined At:
| Collection | DateRange | Dictionary | Object | Undefined |

o not

Synopsis:
FALSE not

Description:

Returns TRUE

Type: Constant          Returns: TRUE

Also Defined At:
| Undefined |

o not

Synopsis:
TRUE not

Description:

Returns FALSE

Type: Constant          Returns: FALSE

Also Defined At:
| Undefined |

o print:

Synopsis:
Boolean print: f

Description:

Prints the recipient object using the supplied format. By default, classes ignore the format and send the unary print message. Classes that can sensibly use the format will redefine the print: message.

Type: Method          Returns: Object

Also Defined At:
| Date | Entity | Number | Object | String | Undefined |

o whatAmI

Synopsis:
Boolean whatAmI

Description:

Returns the string 'Boolean'.

Type: Constant          Returns: String

Also Defined At:
| Block | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o whatAmI

Synopsis:
FALSE whatAmI

Description:

Returns the string 'FALSE'.

Type: Constant          Returns: String

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o whatAmI

Synopsis:
TRUE whatAmI

Description:

Returns the string 'boolean'.

Type: Constant          Returns: String

Also Defined At:
| Block | Boolean | Classification | Collection | Currency | Date | DateOffset | DateRange | Dictionary | Entity | IndexedList | Interface | List | Number | Object | OpenVision | Schema | String | TimeSeries | Undefined | Utility |

o ||

Synopsis:
FALSE || aBoolean

Description:

Returns TRUE if parameter is TRUE. Note that if parameter is a block, it is evaluated first.

Type: Method          Returns: CoreWorkspace

Parameters:

1 - Boolean

Also Defined At:
| Undefined |

o ||

Synopsis:
TRUE || aBoolean

Description:

Returns TRUE independent of parameter.

Type: Method          Returns: Boolean

Parameters:

1 - Boolean

Also Defined At:
| Undefined |