summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/kitfox/svg/xml/StyleSheetRule.java
blob: 5389c2d28ba97dd0e7750a331954d7646bef4b99 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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;
    }

}