Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to override action scripts operators, in particular I would like to override the equals operator

Is it possible to override the equals() operator (ie. for customer classes where equality may be determined by 2 or more fields matching).

like image 590
nso1 Avatar asked Dec 08 '25 12:12

nso1


1 Answers

if you mean overloading "==" as a synonym for equals() then you can't, as ActionScript doesn't offer operator overloading. Just write an equals() method for your class and use that...

like image 86
Scott Evernden Avatar answered Dec 10 '25 02:12

Scott Evernden