1 8 package org.nfunk.jep; 9 10 import org.nfunk.jep.function.PostfixMathCommandI; 11 12 19 public class Operator { 20 21 22 private String name; 23 24 private String symbol; 25 26 private PostfixMathCommandI pfmc; 27 28 29 private Operator() 30 { 31 } 32 33 38 public Operator(String name,PostfixMathCommandI pfmc) 39 { 40 this(); 41 this.name = name; this.pfmc = pfmc; 42 this.symbol = name; 43 } 44 50 public Operator(String name,String symbol,PostfixMathCommandI pfmc) 51 { 52 this(); 53 this.name = name; this.pfmc = pfmc; 54 this.symbol = symbol; 55 } 56 57 public final String getSymbol() {return symbol;} 58 59 public final String getName() {return name;} 60 public final PostfixMathCommandI getPFMC() { return pfmc;} 61 public final void setPFMC(PostfixMathCommandI pfmc) { this.pfmc = pfmc;} 62 63 public String toString() { return "Operator: \""+name+"\""; } 64 } 65 | Popular Tags |