source: josm/trunk/src/com/kitfox/svg/xml/StyleSheetRule.java@ 13804

Last change on this file since 13804 was 11525, checked in by Don-vip, 8 years ago

see #14319 - update to latest version of svgSalamander (2017-01-07, patched)

  • Property svn:eol-style set to native
File size: 1.5 KB
Line 
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5package com.kitfox.svg.xml;
6
7/**
8 *
9 * @author kitfox
10 */
11public class StyleSheetRule
12{
13 final String styleName;
14 final String tag;
15 final String className;
16
17 public StyleSheetRule(String styleName, String tag, String className)
18 {
19 this.styleName = styleName;
20 this.tag = tag;
21 this.className = className;
22 }
23
24 @Override
25 public int hashCode()
26 {
27 int hash = 7;
28 hash = 13 * hash + (this.styleName != null ? this.styleName.hashCode() : 0);
29 hash = 13 * hash + (this.tag != null ? this.tag.hashCode() : 0);
30 hash = 13 * hash + (this.className != null ? this.className.hashCode() : 0);
31 return hash;
32 }
33
34 @Override
35 public boolean equals(Object obj)
36 {
37 if (obj == null)
38 {
39 return false;
40 }
41 if (getClass() != obj.getClass())
42 {
43 return false;
44 }
45 final StyleSheetRule other = (StyleSheetRule) obj;
46 if ((this.styleName == null) ? (other.styleName != null) : !this.styleName.equals(other.styleName))
47 {
48 return false;
49 }
50 if ((this.tag == null) ? (other.tag != null) : !this.tag.equals(other.tag))
51 {
52 return false;
53 }
54 if ((this.className == null) ? (other.className != null) : !this.className.equals(other.className))
55 {
56 return false;
57 }
58 return true;
59 }
60
61}
Note: See TracBrowser for help on using the repository browser.