TWiki . Doc . NiceToggleExample

/* Please try the BeginnerExamples before the IntermediateExamples
   Put this code in a subdirectory: methcall_intermediatetwo\toggles 

To compile:
   nicec toggles
*/

package toggles;

class Toggle {
    boolean state = true;

    boolean value();
    Toggle activate();
}

value(Toggle t){ return t.state; }

activate(Toggle t){ 
    t.state = !t.state; 
    return t; }

-- IsaacGouy - 24 Dec 2003

----- Revision r1.2 - 24 Dec 2003 - 21:35 GMT - IsaacGouy
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback.