samples/apifest1/day2/inputandoperation/src/org/netbeans/apifest/boolcircuit/Operation.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  * Operation.java
     3  *
     4  * Created on July 12, 2006, 2:26 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 public abstract class Operation {
    16 
    17     private boolean used;
    18     
    19     /** Creates a new instance of Operation */
    20     protected Operation() {
    21     }
    22     
    23     public abstract boolean performBooleanOperation();
    24     
    25     final void markOperationAsUsed() {
    26         used = true;
    27     }
    28     
    29     final boolean isUsed() {
    30         return used;
    31     }
    32 
    33     public abstract double performRealOperation();
    34     
    35 }