1 24 package org.riotfamily.forms.resource; 25 26 import org.springframework.util.Assert; 27 28 31 public class StylesheetResource implements FormResource { 32 33 private String url; 34 35 public StylesheetResource(String url) { 36 Assert.notNull(url); 37 this.url = url; 38 } 39 40 public String getUrl() { 41 return this.url; 42 } 43 44 public void accept(ResourceVisitor visitor) { 45 visitor.visitStyleSheet(this); 46 } 47 48 public int hashCode() { 49 return url.hashCode(); 50 } 51 52 public boolean equals(Object obj) { 53 if (obj == null) { 54 return false; 55 } 56 if (obj == this) { 57 return true; 58 } 59 if (obj instanceof StylesheetResource) { 60 StylesheetResource other = (StylesheetResource) obj; 61 return this.url.equals(other.url); 62 } 63 return false; 64 } 65 66 } | Popular Tags |