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    @Override
025    public int hashCode()
026    {
027        int hash = 7;
028        hash = 13 * hash + (this.styleName != null ? this.styleName.hashCode() : 0);
029        hash = 13 * hash + (this.tag != null ? this.tag.hashCode() : 0);
030        hash = 13 * hash + (this.className != null ? this.className.hashCode() : 0);
031        return hash;
032    }
033
034    @Override
035    public boolean equals(Object obj)
036    {
037        if (obj == null)
038        {
039            return false;
040        }
041        if (getClass() != obj.getClass())
042        {
043            return false;
044        }
045        final StyleSheetRule other = (StyleSheetRule) obj;
046        if ((this.styleName == null) ? (other.styleName != null) : !this.styleName.equals(other.styleName))
047        {
048            return false;
049        }
050        if ((this.tag == null) ? (other.tag != null) : !this.tag.equals(other.tag))
051        {
052            return false;
053        }
054        if ((this.className == null) ? (other.className != null) : !this.className.equals(other.className))
055        {
056            return false;
057        }
058        return true;
059    }
060
061}