Why not make the shuffle parameter just a Bool? It will translate into a primitive boolean in Java.