有没有一种方法来覆盖操作脚本运营商,特别是我想重写等于运营商运营商、我想、特别是、重写

2023-09-08 14:23:58 作者:劳资 不稀罕你

是否有可能重写了equals()运算符(即客户类,其中的平等可以通过2个或多个字段的匹配来确定)。

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

推荐答案

如果你的意思是超载==的代名词的equals(),那么你不能,因为动作不提供操作符重载。只要写一个equals()方法的类,并使用...

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...

 
精彩推荐
图片推荐