function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rup3Rup3 

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 

 

Message Edited by Rup3 on 10-05-2009 02:21 PM