1 14 package org.wings; 15 16 import org.wings.io.Device; 17 18 import java.io.IOException ; 19 import java.io.Serializable ; 20 21 26 public class SimpleURL implements Serializable , Renderable { 27 protected String baseURL; 28 29 protected SimpleURL() {} 30 31 public SimpleURL(String url) { 32 baseURL = url; 33 } 34 35 public void write(Device d) throws IOException { 36 if (baseURL != null) { 37 d.print(baseURL); 38 } 39 } 40 41 public boolean equals(Object o) { 42 if (o == null) return false; 43 SimpleURL other = (SimpleURL) o; 44 return (baseURL == other.baseURL 45 || (baseURL != null && baseURL.equals(other.baseURL))); 46 } 47 48 51 public int hashCode() { 52 return baseURL != null ? baseURL.hashCode() : 0; 53 } 54 55 public String toString() { 56 return baseURL; 57 } 58 } 59 60 61 | Popular Tags |