001/*
002 * To change this template, choose Tools | Templates
003 * and open the template in the editor.
004 */
005package com.kitfox.svg.xml;
006
007/**
008 *
009 * @author kitfox
010 */
011public class StyleSheetRule
012{
013    final String styleName;
014    final String tag;
015    final String className;
016
017    public StyleSheetRule(String styleName, String tag, String className)
018    {
019        this.styleName = styleName;
020        this.tag = tag;
021        this.className = className;
022    }
023
024    public int hashCode()
025    {
026        int hash = 7;
027        hash = 13 * hash + (this.styleName != null ? this.styleName.hashCode() : 0);
028        hash = 13 * hash + (this.tag != null ? this.tag.hashCode() : 0);
029        hash = 13 * hash + (this.className != null ? this.className.hashCode() : 0);
030        return hash;
031    }
032
033    public boolean equals(Object obj)
034    {
035        if (obj == null)
036        {
037            return false;
038        }
039        if (getClass() != obj.getClass())
040        {
041            return false;
042        }
043        final StyleSheetRule other = (StyleSheetRule) obj;
044        if ((this.styleName == null) ? (other.styleName != null) : !this.styleName.equals(other.styleName))
045        {
046            return false;
047        }
048        if ((this.tag == null) ? (other.tag != null) : !this.tag.equals(other.tag))
049        {
050            return false;
051        }
052        if ((this.className == null) ? (other.className != null) : !this.className.equals(other.className))
053        {
054            return false;
055        }
056        return true;
057    }
058
059}