You need to sign in to do that
Don't have an account?
Rup3
APEX general syntax : operator methods
Hi,
I'm trying to port this kind of code from Java :
public class MyClass{
private Long[] data;
public UseCase(int size)
{
...
}
public bool this[int index]
{
get { return ...; }
set { // do something
}
}
public static bool operator ==(MyClass x, MyClass y)
{
if (...) {
return true;
} else {
return false;
}
}
}
I woud like to define 2 types of operators :
- getter/setter which works on my data[]
- boolean operators like ==, !=, &, |, ^, etc.
Is this possible with APEX ? If not, will it be soon ?
Rup