1 21 package com.db4o.nativequery.expr.cmp; 22 23 public final class ArithmeticOperator { 24 public final static int ADD_ID=0; 25 public final static int SUBTRACT_ID=1; 26 public final static int MULTIPLY_ID=2; 27 public final static int DIVIDE_ID=3; 28 29 public final static ArithmeticOperator ADD=new ArithmeticOperator(ADD_ID,"+"); 30 public final static ArithmeticOperator SUBTRACT=new ArithmeticOperator(SUBTRACT_ID,"-"); 31 public final static ArithmeticOperator MULTIPLY=new ArithmeticOperator(MULTIPLY_ID,"*"); 32 public final static ArithmeticOperator DIVIDE=new ArithmeticOperator(DIVIDE_ID,"/"); 33 34 private String _op; 35 private int _id; 36 37 private ArithmeticOperator(int id,String op) { 38 _id=id; 39 _op=op; 40 } 41 42 public int id() { 43 return _id; 44 } 45 46 public String toString() { 47 return _op; 48 } 49 } 50 | Popular Tags |