samples/apifest1/day2/inputandoperation/src/org/netbeans/apifest/boolcircuit/BooleanInput.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:52:45 +0200
changeset 52 4257f4cf226b
permissions -rw-r--r--
Adding samples from API fest to the repository, including pieces of their code in the document, not just links
     1 /*
     2  * BooleanInput.java
     3  *
     4  * Created on July 12, 2006, 2:31 PM
     5  *
     6  * To change this template, choose Tools | Template Manager
     7  * and open the template in the editor.
     8  */
     9 
    10 package org.netbeans.apifest.boolcircuit;
    11 
    12 /**
    13  *
    14  */
    15 final class BooleanInput extends Input {
    16 
    17     private boolean value;
    18     
    19     /** Creates a new instance of BooleanInput */
    20     public BooleanInput(boolean val) {
    21         value = val;
    22     }
    23 
    24     public boolean getBooleanValue() {
    25         return value;
    26     }
    27 
    28     public double getRealValue() {
    29         return value ? 1f : 0f; 
    30     }
    31     
    32 }