[jdom-interest] Text class

Matthew Mackenzie matt at xmlglobal.com
Sat May 26 20:33:56 PDT 2001


Question: Will setText(String) be removed when this Text class is
integrated, or will setText(String) be transparently promoted to
setText(Text) with all getText() calls returning Text?
 
-Matt
 
-----Original Message----- 
From: Brett McLaughlin 
Sent: Sat 5/26/2001 5:03 PM 
To: jdom-interest at jdom.org 
Cc: 
Subject: [jdom-interest] Text class



	Here's where we're at:
	
	public class Text {
	
	    private StringBuffer value;
	
	    protected Text() { }
	
	    public Text(String stringValue) {
	        value = new StringBuffer(stringValue);
	    }
	
	    public String getValue() {
	        return value.toString();
	    }
	
	    public void setValue(String stringValue) {
	        value = new StringBuffer(stringValue);
	    }
	
	    public void append(String stringValue) {
	        value.append(stringValue);
	    }
	
	    public String toString() {
	        return getValue();
	    }
	
	    public int hashCode() {
	        return value.toString().hashCode();
	    }
	
	    // Leaving out impl for now on below here
	    public boolean equals(Object ob);
	
	}
	
	OK. Now we can discuss. What you think?
	
	-Brett
	
	_______________________________________________
	To control your jdom-interest membership:
	
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@you
rhost.com
	

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4998 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20010526/038e5f12/attachment.bin


More information about the jdom-interest mailing list