Particle Swarm Optimisation objective like implementation in Java