views:

177

answers:

1

What is the most concise way of converting a java.util.List into a normal JavaFX sequence (in JavaFX)?

e.g.

def myList = java.util.Arrays.asList(1, 2, 3);
def mySequence = ... // a sequence containing [1, 2, 3]
+3  A: 

This is the most concise way I could find - there may be a more direct method though

def myList = java.util.Arrays.asList(1, 2, 3);
def mySequence = for (i in myList) i;

println("mySequence={mySequence}");
Matthew Hegarty