[BACK]Return to CMO_INT32.java CVS log [TXT][DIR] Up to [local] / OpenXM / src / OpenMath / ORG / openxm / tam

Annotation of OpenXM/src/OpenMath/ORG/openxm/tam/CMO_INT32.java, Revision 1.2

1.1       tam         1: /**
1.2     ! tam         2:  * $OpenXM: OpenXM/src/OpenMath/ORG/openxm/tam/CMO_INT32.java,v 1.1 2000/09/12 07:05:06 tam Exp $
1.1       tam         3:  */
                      4: package ORG.openxm.tam;
                      5:
                      6: import java.io.*;
                      7:
                      8: /**
                      9:  * CMO $B7A<0$N(B INT32 $B7?$rI=$7$^$9(B.
                     10:  */
                     11: final public class CMO_INT32 extends CMO{
                     12:   private int value;
                     13:
                     14:   /**
                     15:    * i $B$rCM$H$9$k(B INT32 $B$r:n@.$7$^$9(B.
                     16:    */
                     17:   public CMO_INT32(int i){
                     18:     value = i;
                     19:   }
                     20:
                     21:   public int DISCRIMINATOR(){
                     22:     return CMO.INT32;
                     23:   }
                     24:
                     25:   /**
                     26:    * $BCM$rF@$^$9(B.
                     27:    */
                     28:   public int intValue(){
                     29:     return value;
                     30:   }
                     31:
1.2     ! tam        32:   public void sendByObject(OpenXMstream os) throws IOException{
1.1       tam        33:     os.writeInt(value);
                     34:   }
                     35:
1.2     ! tam        36:   static protected CMO receive(OpenXMstream is) throws IOException{
1.1       tam        37:     int value = is.readInt();
                     38:
                     39:     return new CMO_INT32(value);
                     40:   }
                     41:
                     42:   public String toCMOexpressionByObject(){
                     43:     return "CMO_INT32,"+ value;
                     44:   }
                     45: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>