eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'BooleanValueHolder':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: BooleanValueHolder


Inheritance:

   Object
   |
   +--Model
      |
      +--ValueModel
         |
         +--ValueHolder
            |
            +--BooleanValueHolder

Package:
stx:libview2
Category:
Interface-Support-Models
Version:
rev: 1.5 date: 2021/01/20 14:36:43
user: cg
file: BooleanValueHolder.st directory: libview2
module: stx stc-classLibrary: libview2

Description:


a valueHolder holding a boolean.
Mostly for documentation purposes and the assertion, that only boolean values
are held. Also provides convenient logical operations.

copyright

COPYRIGHT (c) 2008 by Claus Gittinger All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

instance creation
o  new
return a new BooleanValueHolder holding false as initial value


Instance protocol:

accessing
o  setValue: aBoolean
(comment from inherited method)
set my value without notification.

logical operations
o  & anotherBooleanValueHolder
return another valueHolder, which returns the logical and of myself and another valueHolder

Usage example(s):

     |b1 b2 a|

     b1 := BooleanValueHolder new.
     b2 := BooleanValueHolder new.
     a := b1 & b2.
     b1 value:false.
     b2 value:true.
     a value.      
     b1 value:true.
     a value.     

o  logicalNot
return another valueHolder, which returns the logical not of myself

o  | anotherBooleanValueHolder
return another valueHolder, which returns the logical or of myself and another valueHolder

Usage example(s):

     |b1 b2 o|

     b1 := BooleanValueHolder new.
     b2 := BooleanValueHolder new.
     o := b1 | b2.
     b1 value:false.
     b2 value:false.
     o value.      
     b1 value:true.
     o value.     


Examples:


     |b nb|

     b := BooleanValueHolder new.
     nb := b not.
     b value:true.
     nb value.     
     b value:false.
     nb value.     


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 27 Jul 2024 06:55:14 GMT