Automatic Table Display of Simple Data Structures

BeakerX automatically displays Maps and Lists as Tables completely automatically in many circumstances.

In [ ]:
["x" : 0, "y" : 1]
In [ ]:
List list = new ArrayList();
list.add(["x" : 2, "y" : 3]);
list.add(["x" : 5, "y" : 8]);
list
In [ ]:
Map[] map = new Map[2];
map[0] = ["x" : 1.414, "y" : 2.718]
map[1] = ["x" : 3.141, "y" : 4.669]
map
In [ ]:
def listOfMap = []
0.upto(10){
    listOfMap += ["exp2": 2**it, "exp3": 3**it]
}
listOfMap
In [ ]:
def myMap = [:]
def myList = []
myList << [1, 2, 3]
myList << [2, 3, 4]
myMap.put(1, myList)
myMap
In [ ]:
def myMap = [:]
def myList = [width:1, height:2]
myMap.put(1, myList)
myMap