How do you program mecanum in iterative robot java

Hi I am a rookie programmer and I am trying to program mecanum wheels in iterative robot java. I see the code in sample robot but I want to convert it into iterative robot. Any suggestions? Any help with be appreciated.

Look here. It is written in C++, but it should be easy to translate it.

Thank you very much

Last year our team wrote our own mecanum drive in order to have more fine-grained control over the process.