DTString.java
上传用户:afrynkmhm
上传日期:2007-01-06
资源大小:1262k
文件大小:1k
- package tinybasic;
- public class DTString extends DTDataType{
- protected String s=null;
- public DTString(Scope scope,DTDataType tbd){
- super(scope,STR_VAR);
- this.s=tbd.getString();
- }
- public DTString(Scope scope,String s){
- super(scope,STR_VAR);
- this.s=s;
- }
- public void setString(String s){
- this.s=s;
- }
- public String getString(){
- return s;
- }
-
- public int compareTo(Object o){
- return s.compareTo(((DTDataType)o).getString());
- }
-
- public void assign(DTDataType tbd){
- setString(tbd);
- }
-
- public String toString(){
- return s.toString();
- }
- }