Skip to content

Commit b88e0c1

Browse files
committed
added proper equality check
1 parent e216875 commit b88e0c1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

org/w3c/css/values/HSL.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@ public void setAlpha(ApplContext ac, CssValue alpha)
129129
va = RGBA.filterAlpha(ac, alpha);
130130
}
131131

132+
public boolean equals(HSL other) {
133+
if (other != null) {
134+
return (vh.equals(other.vh) && vs.equals(other.vs) && vl.equals(other.vl) &&
135+
((va == null && other.va == null) || (va != null && va.equals(other.va))));
136+
}
137+
return false;
138+
}
139+
132140
/**
133141
* Returns a string representation of the object.
134142
*/

0 commit comments

Comments
 (0)