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
jtulach@52
     1
/*
jtulach@52
     2
 * Operation.java
jtulach@52
     3
 *
jtulach@52
     4
 * Created on July 12, 2006, 2:26 PM
jtulach@52
     5
 *
jtulach@52
     6
 * To change this template, choose Tools | Template Manager
jtulach@52
     7
 * and open the template in the editor.
jtulach@52
     8
 */
jtulach@52
     9
jtulach@52
    10
package org.netbeans.apifest.boolcircuit;
jtulach@52
    11
jtulach@52
    12
/**
jtulach@52
    13
 *
jtulach@52
    14
 */
jtulach@52
    15
public abstract class Operation {
jtulach@52
    16
jtulach@52
    17
    private boolean used;
jtulach@52
    18
    
jtulach@52
    19
    /** Creates a new instance of Operation */
jtulach@52
    20
    protected Operation() {
jtulach@52
    21
    }
jtulach@52
    22
    
jtulach@52
    23
    public abstract boolean performBooleanOperation();
jtulach@52
    24
    
jtulach@52
    25
    final void markOperationAsUsed() {
jtulach@52
    26
        used = true;
jtulach@52
    27
    }
jtulach@52
    28
    
jtulach@52
    29
    final boolean isUsed() {
jtulach@52
    30
        return used;
jtulach@52
    31
    }
jtulach@52
    32
jtulach@52
    33
    public abstract double performRealOperation();
jtulach@52
    34
    
jtulach@52
    35
}