package org.musetest.core.step.descriptor;

/**
 * @author Christopher L Merrill (see LICENSE.txt for license details)
 */
public class RgbColorDescriptor extends ColorDescriptor
    {
    public RgbColorDescriptor(float red, float green, float blue)
        {
        _red = red;
        _green = green;
        _blue = blue;
        }

    public float _red;
    public float _green;
    public float _blue;

    public final static ColorDescriptor RED = new RgbColorDescriptor(1.0f, 0.0f, 0.0f);
    public final static ColorDescriptor GREEN = new RgbColorDescriptor(0.0f, 1.0f, 0.0f);
    public final static ColorDescriptor BLACK = new RgbColorDescriptor(0.0f, 0.0f, 0.0f);
    }
@@ -331,16 +331,481 @@
      %7D%0A%0A
+    @Override%0A    public boolean equals(Object obj)%0A        %7B%0A        if (obj instanceof RgbColorDescriptor)%0A            %7B%0A            RgbColorDescriptor other = (RgbColorDescriptor) obj;%0A            return other._red == _red && other._blue == _blue && other._green == _green;%0A            %7D%0A        return false;%0A        %7D%0A%0A    @Override%0A    public int hashCode()%0A        %7B%0A        return ((int)(1000*_red)) * ((int)(1000*_blue)) * ((int)(1000*_green));%0A        %7D%0A%0A
     publ

Implement RgbColorDescriptor equals() and hashcode() for use as a map key.