Mercurial Hosting > nabble
comparison src/fschmidt/html/HtmlCdata.java @ 68:00520880ad02
add fschmidt source
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Sun, 05 Oct 2025 17:24:15 -0600 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 67:9d0fefce6985 | 68:00520880ad02 |
|---|---|
| 1 package fschmidt.html; | |
| 2 | |
| 3 | |
| 4 public final class HtmlCdata { | |
| 5 public final String text; | |
| 6 | |
| 7 public HtmlCdata(String text) { | |
| 8 this.text = text; | |
| 9 } | |
| 10 | |
| 11 public String toString() { | |
| 12 return "<![CDATA["+text+"]]>"; | |
| 13 } | |
| 14 | |
| 15 public boolean equals(Object obj) { | |
| 16 if( obj == this ) | |
| 17 return true; | |
| 18 if( !(obj instanceof HtmlCdata) ) | |
| 19 return false; | |
| 20 HtmlCdata m = (HtmlCdata)obj; | |
| 21 return m.text.equals(text); | |
| 22 } | |
| 23 | |
| 24 public int hashCode() { | |
| 25 return text.hashCode(); | |
| 26 } | |
| 27 | |
| 28 } |
