Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/ujac/util/exi/Operation.java


1   /*
2    * Copyright (C) 2003 by Christian Lauer.
3    *
4    * This library is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Library General Public
6    * License as published by the Free Software Foundation; either
7    * version 2 of the License, or (at your option) any later version.
8    *
9    * This library is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   * Library General Public License for more details.
13   *
14   * You should have received a copy of the GNU Library General Public
15   * License along with this library; if not, write to the Free
16   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17   *
18   * If you didn't download this code from the following link, you should check if
19   * you aren't using an obsolete version:
20   * http://sourceforge.net/projects/ujac
21   */
22  
23  package org.ujac.util.exi;
24  
25  /**
26   * Name: Operation<br>
27   * Description: A class specifying expression operations.
28   * <br>Log: $Log: Operation.java,v $
29   * <br>Log: Revision 1.2  2003/11/01 12:06:38  lauerc
30   * <br>Log: Added copyright notice.
31   * <br>Log:
32   * <br>Log: Revision 1.1  2003/07/28 22:35:06  lauerc
33   * <br>Log: Initial revision.
34   * <br>Log:
35   * @author $Author: lauerc $
36   * @version $Revision: 1.2 $
37   */
38  public class Operation {
39  
40    /** The operation name. */
41    private String name;
42    /** The operation priotity. */
43    private int priority;
44    
45  
46    /**
47     * Constructs a Operation instance with specific attributes.
48     */
49    public Operation(String name) {
50      this.name = name;
51      this.priority = 0;
52    }
53  
54    /**
55     * Constructs a Operation instance with specific attributes.
56     */
57    public Operation(String name, int priority) {
58      this.name = name;
59      this.priority = priority;
60    }
61  
62    /**
63     * Gets the operation name.
64     * @return The operation name.
65     */
66    public String getName() {
67      return name;
68    }
69  
70    /**
71     * Gets the operation's priority.
72     * @return The operation's priority.
73     */
74    public int getPriority() {
75      return priority;
76    }
77    
78    /**
79     * @see java.lang.Object#toString()
80     */
81    public String toString() {
82      return name;
83    }
84  }