adding takeOrdered to java API