From 6776ed9f1a81e517139d85eb6d2e28911fd0fc35 Mon Sep 17 00:00:00 2001 From: kitfox Date: Tue, 19 Mar 2013 05:20:37 +0000 Subject: Adding support for style sheets. git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@153 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b --- .../java/com/kitfox/svg/xml/StyleSheetRule.java | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/main/java/com/kitfox/svg/xml/StyleSheetRule.java (limited to 'src/main/java/com/kitfox/svg/xml/StyleSheetRule.java') diff --git a/src/main/java/com/kitfox/svg/xml/StyleSheetRule.java b/src/main/java/com/kitfox/svg/xml/StyleSheetRule.java new file mode 100644 index 0000000..5389c2d --- /dev/null +++ b/src/main/java/com/kitfox/svg/xml/StyleSheetRule.java @@ -0,0 +1,59 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package com.kitfox.svg.xml; + +/** + * + * @author kitfox + */ +public class StyleSheetRule +{ + final String styleName; + final String tag; + final String className; + + public StyleSheetRule(String styleName, String tag, String className) + { + this.styleName = styleName; + this.tag = tag; + this.className = className; + } + + public int hashCode() + { + int hash = 7; + hash = 13 * hash + (this.styleName != null ? this.styleName.hashCode() : 0); + hash = 13 * hash + (this.tag != null ? this.tag.hashCode() : 0); + hash = 13 * hash + (this.className != null ? this.className.hashCode() : 0); + return hash; + } + + public boolean equals(Object obj) + { + if (obj == null) + { + return false; + } + if (getClass() != obj.getClass()) + { + return false; + } + final StyleSheetRule other = (StyleSheetRule) obj; + if ((this.styleName == null) ? (other.styleName != null) : !this.styleName.equals(other.styleName)) + { + return false; + } + if ((this.tag == null) ? (other.tag != null) : !this.tag.equals(other.tag)) + { + return false; + } + if ((this.className == null) ? (other.className != null) : !this.className.equals(other.className)) + { + return false; + } + return true; + } + +} -- cgit v1.2.3-55-g7522