Thank you both very much for the answers!
I have to admit that I'm not that proficient with Java and my last Java project was a few years ago but I'm eager to look into the GenericWeighting. Once, I figured out how it exactly works I'm happy to report back and also ask about the requirements I have problems with. But this might take me a few days.
Have a nice weekend!!