{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "package beakerx.test;\n", "\n", "import java.util.LinkedHashMap;\n", "import java.util.List;\n", "import java.util.Map;\n", "import java.util.Random;\n", "import java.util.function.Supplier;\n", "import java.util.stream.Stream;\n", "\n", "TableDisplay.setLoadingMode(TableDisplayLoadingMode.ENDLESS);\n", "\n", "Stream> s1 = Stream.generate(new Supplier>() {\n", " Random random = new Random();\n", " int index = 0;\n", " @Override\n", " public Map get() {\n", " return new LinkedHashMap() {\n", " {\n", " put(\"str1\", index++);\n", " put(\"str2\", random.nextFloat());\n", " put(\"str3\", random.nextInt());\n", " }\n", " };\n", " }\n", " });\n", "return new TableDisplay(s1);" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Java", "language": "java", "name": "java" }, "language_info": { "codemirror_mode": "text/x-java", "file_extension": ".java", "mimetype": "", "name": "Java", "nbconverter_exporter": "", "version": "1.8.0_121" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": false, "sideBar": false, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": false, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }