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

Annotation of OpenXM/src/OpenMath/ORG/openxm/tam/CMO_INDETERMINATE.java, Revision 1.3

1.1       tam         1: /**
1.3     ! ohara       2:  * $OpenXM: OpenXM/src/OpenMath/ORG/openxm/tam/CMO_INDETERMINATE.java,v 1.2 2000/09/13 06:32:42 tam Exp $
1.1       tam         3:  */
                      4: package ORG.openxm.tam;
                      5:
                      6: import java.io.*;
                      7:
                      8: /**
                      9:  * CMO $B7A<0$N(B INDETERMINATE $B7?$rI=$7$^$9(B.
                     10:  */
                     11: final public class CMO_INDETERMINATE extends CMO{
                     12:   private CMO_STRING variable;
                     13:
                     14:   /**
                     15:    * $BJQ?tL>(B str $B$H$J$k(B INDETERMINATE $B$r:n@.$7$^$9(B.
                     16:    */
                     17:   public CMO_INDETERMINATE(String str){
                     18:     variable = new CMO_STRING(str);
                     19:   }
                     20:
                     21:   /**
                     22:    * $BJQ?tL>$rF@$^$9(B.
                     23:    */
                     24:   public String getString(){
                     25:     return variable.getString();
                     26:   }
                     27:
                     28:   public int DISCRIMINATOR(){
                     29:     return CMO.INDETERMINATE;
                     30:   }
1.3     ! ohara      31:
        !            32:     public boolean allowQ (int[] datacap) {
        !            33:                return CMO.allowQ_tag(datacap, DISCRIMINATOR()) && variable.allowQ(datacap);
        !            34:     }
1.1       tam        35:
1.2       tam        36:   public void sendByObject(OpenXMstream os)
1.1       tam        37:        throws IOException,MathcapViolation{
                     38:     variable.write(os);
                     39:   }
                     40:
1.2       tam        41:   static protected CMO receive(OpenXMstream is) throws IOException{
1.1       tam        42:     CMO_STRING variable;
                     43:     CMO tmp;
                     44:
                     45:     tmp = CMO.receive(is);
                     46:     if(!(tmp instanceof CMO_STRING)){
                     47:       System.err.println("not CMOobject");
                     48:     }
                     49:     variable = (CMO_STRING)tmp;
                     50:
                     51:     return new CMO_INDETERMINATE(variable.getString());
                     52:   }
                     53:
                     54:   public String toCMOexpressionByObject(){
                     55:     return "CMO_INDETERMINATE,"+ variable.toCMOexpression();
                     56:   }
                     57: }

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