├── docs └── javadoc │ ├── element-list │ ├── tag-search-index.js │ ├── module-search-index.js │ ├── resources │ ├── x.png │ └── glass.png │ ├── package-search-index.js │ ├── script-dir │ ├── images │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_2e83ff_256x240.png │ │ ├── ui-icons_454545_256x240.png │ │ ├── ui-icons_888888_256x240.png │ │ ├── ui-icons_cd0a0a_256x240.png │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ ├── ui-bg_glass_65_dadada_1x400.png │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ └── ui-bg_highlight-soft_75_cccccc_1x100.png │ └── jquery-ui.structure.min.css │ ├── index.html │ ├── type-search-index.js │ ├── jquery-ui.overrides.css │ ├── legal │ ├── ASSEMBLY_EXCEPTION │ ├── jqueryUI.md │ ├── ADDITIONAL_LICENSE_INFO │ └── jquery.md │ ├── copy.svg │ ├── allpackages-index.html │ ├── index-files │ ├── index-22.html │ ├── index-21.html │ ├── index-20.html │ ├── index-2.html │ ├── index-15.html │ ├── index-8.html │ ├── index-5.html │ ├── index-10.html │ ├── index-14.html │ ├── index-4.html │ ├── index-7.html │ ├── index-9.html │ ├── index-19.html │ └── index-11.html │ ├── script.js │ ├── io │ └── avery │ │ └── vinyl │ │ ├── JoinPred.html │ │ ├── JoinExpr.html │ │ ├── package-tree.html │ │ └── JoinAPI.html │ ├── overview-tree.html │ └── help-doc.html ├── .gitignore ├── LICENSE.md ├── src └── main │ └── java │ └── io │ └── avery │ └── vinyl │ ├── JoinExpr.java │ ├── Utils.java │ ├── Field.java │ ├── FieldPin.java │ ├── IntoAPI.java │ ├── Header.java │ ├── RecordSet.java │ └── package-info.java └── pom.xml /docs/javadoc/element-list: -------------------------------------------------------------------------------- 1 | io.avery.vinyl 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.idea 2 | *~ 3 | *target 4 | Bench.java 5 | -------------------------------------------------------------------------------- /docs/javadoc/tag-search-index.js: -------------------------------------------------------------------------------- 1 | tagSearchIndex = [];updateSearchResults(); -------------------------------------------------------------------------------- /docs/javadoc/module-search-index.js: -------------------------------------------------------------------------------- 1 | moduleSearchIndex = [];updateSearchResults(); -------------------------------------------------------------------------------- /docs/javadoc/resources/x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/resources/x.png -------------------------------------------------------------------------------- /docs/javadoc/resources/glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/resources/glass.png -------------------------------------------------------------------------------- /docs/javadoc/package-search-index.js: -------------------------------------------------------------------------------- 1 | packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"io.avery.vinyl"}];updateSearchResults(); -------------------------------------------------------------------------------- /docs/javadoc/script-dir/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/script-dir/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /docs/javadoc/script-dir/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/script-dir/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /docs/javadoc/script-dir/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/script-dir/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /docs/javadoc/script-dir/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/script-dir/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /docs/javadoc/script-dir/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/script-dir/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /docs/javadoc/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /docs/javadoc/script-dir/images/ui-bg_glass_65_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/script-dir/images/ui-bg_glass_65_dadada_1x400.png -------------------------------------------------------------------------------- /docs/javadoc/script-dir/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/script-dir/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /docs/javadoc/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /docs/javadoc/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /docs/javadoc/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davery22/vinyl/HEAD/docs/javadoc/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /docs/javadoc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Generated Documentation (Untitled) 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 |
19 | 22 |

io/avery/vinyl/package-summary.html

23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Daniel Avery 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /docs/javadoc/type-search-index.js: -------------------------------------------------------------------------------- 1 | typeSearchIndex = [{"p":"io.avery.vinyl","l":"AggregateAPI"},{"p":"io.avery.vinyl","l":"AggregateAPI.Aggs"},{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"io.avery.vinyl","l":"Analytics"},{"p":"io.avery.vinyl","l":"RecordStream.Aux"},{"p":"io.avery.vinyl","l":"RecordStream.AuxDouble"},{"p":"io.avery.vinyl","l":"RecordStream.AuxInt"},{"p":"io.avery.vinyl","l":"RecordStream.AuxLong"},{"p":"io.avery.vinyl","l":"Field"},{"p":"io.avery.vinyl","l":"FieldPin"},{"p":"io.avery.vinyl","l":"JoinAPI.Select.Fields"},{"p":"io.avery.vinyl","l":"SelectAPI.Fields"},{"p":"io.avery.vinyl","l":"SelectAPI.Window.Fields"},{"p":"io.avery.vinyl","l":"Header"},{"p":"io.avery.vinyl","l":"IntoAPI"},{"p":"io.avery.vinyl","l":"JoinAPI"},{"p":"io.avery.vinyl","l":"JoinExpr"},{"p":"io.avery.vinyl","l":"JoinPred"},{"p":"io.avery.vinyl","l":"AggregateAPI.Keys"},{"p":"io.avery.vinyl","l":"SelectAPI.Window.Keys"},{"p":"io.avery.vinyl","l":"JoinAPI.On"},{"p":"io.avery.vinyl","l":"Record"},{"p":"io.avery.vinyl","l":"RecordSet"},{"p":"io.avery.vinyl","l":"RecordStream"},{"p":"io.avery.vinyl","l":"AggregateAPI.Route"},{"p":"io.avery.vinyl","l":"JoinAPI.Select"},{"p":"io.avery.vinyl","l":"SelectAPI"},{"p":"io.avery.vinyl","l":"SelectAPI.Window"}];updateSearchResults(); -------------------------------------------------------------------------------- /docs/javadoc/jquery-ui.overrides.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | .ui-state-active, 27 | .ui-widget-content .ui-state-active, 28 | .ui-widget-header .ui-state-active, 29 | a.ui-button:active, 30 | .ui-button:active, 31 | .ui-button.ui-state-active:hover { 32 | /* Overrides the color of selection used in jQuery UI */ 33 | background: #F8981D; 34 | } 35 | -------------------------------------------------------------------------------- /docs/javadoc/legal/ASSEMBLY_EXCEPTION: -------------------------------------------------------------------------------- 1 | 2 | OPENJDK ASSEMBLY EXCEPTION 3 | 4 | The OpenJDK source code made available by Oracle America, Inc. (Oracle) at 5 | openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU 6 | General Public License version 2 7 | only ("GPL2"), with the following clarification and special exception. 8 | 9 | Linking this OpenJDK Code statically or dynamically with other code 10 | is making a combined work based on this library. Thus, the terms 11 | and conditions of GPL2 cover the whole combination. 12 | 13 | As a special exception, Oracle gives you permission to link this 14 | OpenJDK Code with certain code licensed by Oracle as indicated at 15 | http://openjdk.java.net/legal/exception-modules-2007-05-08.html 16 | ("Designated Exception Modules") to produce an executable, 17 | regardless of the license terms of the Designated Exception Modules, 18 | and to copy and distribute the resulting executable under GPL2, 19 | provided that the Designated Exception Modules continue to be 20 | governed by the licenses under which they were offered by Oracle. 21 | 22 | As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code 23 | to build an executable that includes those portions of necessary code that 24 | Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 25 | with the Classpath exception). If you modify or add to the OpenJDK code, 26 | that new GPL2 code may still be combined with Designated Exception Modules 27 | if the new code is made subject to this exception by its copyright holder. 28 | -------------------------------------------------------------------------------- /docs/javadoc/script-dir/jquery-ui.structure.min.css: -------------------------------------------------------------------------------- 1 | /*! jQuery UI - v1.12.1 - 2018-12-06 2 | * http://jqueryui.com 3 | * Copyright jQuery Foundation and other contributors; Licensed MIT */ 4 | 5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} -------------------------------------------------------------------------------- /docs/javadoc/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 27 | 28 | 29 | 31 | 33 | 34 | -------------------------------------------------------------------------------- /docs/javadoc/legal/jqueryUI.md: -------------------------------------------------------------------------------- 1 | ## jQuery UI v1.12.1 2 | 3 | ### jQuery UI License 4 | ``` 5 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 6 | 7 | This software consists of voluntary contributions made by many 8 | individuals. For exact contribution history, see the revision history 9 | available at https://github.com/jquery/jquery-ui 10 | 11 | The following license applies to all parts of this software except as 12 | documented below: 13 | 14 | ==== 15 | 16 | Permission is hereby granted, free of charge, to any person obtaining 17 | a copy of this software and associated documentation files (the 18 | "Software"), to deal in the Software without restriction, including 19 | without limitation the rights to use, copy, modify, merge, publish, 20 | distribute, sublicense, and/or sell copies of the Software, and to 21 | permit persons to whom the Software is furnished to do so, subject to 22 | the following conditions: 23 | 24 | The above copyright notice and this permission notice shall be 25 | included in all copies or substantial portions of the Software. 26 | 27 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 28 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 29 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 30 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 31 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 32 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 33 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 34 | 35 | ==== 36 | 37 | Copyright and related rights for sample code are waived via CC0. Sample 38 | code is defined as all source code contained within the demos directory. 39 | 40 | CC0: http://creativecommons.org/publicdomain/zero/1.0/ 41 | 42 | ==== 43 | 44 | All files located in the node_modules and external directories are 45 | externally maintained libraries used by this software which have their 46 | own licenses; we recommend you read them, as their terms may differ from 47 | the terms above. 48 | 49 | ``` 50 | -------------------------------------------------------------------------------- /docs/javadoc/legal/ADDITIONAL_LICENSE_INFO: -------------------------------------------------------------------------------- 1 | ADDITIONAL INFORMATION ABOUT LICENSING 2 | 3 | Certain files distributed by Oracle America, Inc. and/or its affiliates are 4 | subject to the following clarification and special exception to the GPLv2, 5 | based on the GNU Project exception for its Classpath libraries, known as the 6 | GNU Classpath Exception. 7 | 8 | Note that Oracle includes multiple, independent programs in this software 9 | package. Some of those programs are provided under licenses deemed 10 | incompatible with the GPLv2 by the Free Software Foundation and others. 11 | For example, the package includes programs licensed under the Apache 12 | License, Version 2.0 and may include FreeType. Such programs are licensed 13 | to you under their original licenses. 14 | 15 | Oracle facilitates your further distribution of this package by adding the 16 | Classpath Exception to the necessary parts of its GPLv2 code, which permits 17 | you to use that code in combination with other independent modules not 18 | licensed under the GPLv2. However, note that this would not permit you to 19 | commingle code under an incompatible license with Oracle's GPLv2 licensed 20 | code by, for example, cutting and pasting such code into a file also 21 | containing Oracle's GPLv2 licensed code and then distributing the result. 22 | 23 | Additionally, if you were to remove the Classpath Exception from any of the 24 | files to which it applies and distribute the result, you would likely be 25 | required to license some or all of the other code in that distribution under 26 | the GPLv2 as well, and since the GPLv2 is incompatible with the license terms 27 | of some items included in the distribution by Oracle, removing the Classpath 28 | Exception could therefore effectively compromise your ability to further 29 | distribute the package. 30 | 31 | Failing to distribute notices associated with some files may also create 32 | unexpected legal consequences. 33 | 34 | Proceed with caution and we recommend that you obtain the advice of a lawyer 35 | skilled in open source matters before removing the Classpath Exception or 36 | making modifications to this package which may subsequently be redistributed 37 | and/or involve the use of third party software. 38 | -------------------------------------------------------------------------------- /src/main/java/io/avery/vinyl/JoinExpr.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2022 Daniel Avery 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | package io.avery.vinyl; 26 | 27 | import java.util.function.Function; 28 | import java.util.function.Supplier; 29 | 30 | /** 31 | * An opaque value representing an expression defined by {@link JoinAPI.On}. 32 | * @param the type of the evaluated expression 33 | */ 34 | public class JoinExpr { 35 | final int side; 36 | 37 | JoinExpr(int side) { 38 | this.side = side; 39 | } 40 | 41 | static class RecordExpr extends JoinExpr { 42 | final Field field; // nullable 43 | final Function mapper; 44 | 45 | RecordExpr(Field field, int side, Function mapper) { 46 | super(side); 47 | this.field = field; 48 | this.mapper = mapper; 49 | } 50 | } 51 | 52 | static class Expr extends JoinExpr { 53 | final Supplier supplier; 54 | 55 | Expr(Supplier supplier) { 56 | super(JoinAPI.NONE); 57 | this.supplier = supplier; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/io/avery/vinyl/Utils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2022 Daniel Avery 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | package io.avery.vinyl; 26 | 27 | import java.util.Comparator; 28 | 29 | /** 30 | * Common utils 31 | */ 32 | class Utils { 33 | /** 34 | * Encoding of null. 35 | */ 36 | private static final Comparable NIL = o -> 0; 37 | 38 | /** 39 | * Natural order, nulls first/lowest. 40 | */ 41 | static Comparator NULLS_FIRST_COMPARATOR = cast((Comparator>) (a, b) -> { 42 | if (a == b) 43 | return 0; 44 | if (a == null) 45 | return -1; 46 | if (b == null) 47 | return 1; 48 | return a.compareTo(b); 49 | }); 50 | 51 | /** 52 | * Natural order, nulls first/lowest (nulls encoded as NIL). 53 | */ 54 | static Comparator NILS_FIRST_COMPARATOR = cast((Comparator>) (a, b) -> { 55 | if (a == b) 56 | return 0; 57 | if (a == NIL) 58 | return -1; 59 | if (b == NIL) 60 | return 1; 61 | return a.compareTo(b); 62 | }); 63 | 64 | /** 65 | * Totally unchecked cast, for when a normal cast is illegal, but we know the cast is safe. 66 | */ 67 | @SuppressWarnings("unchecked") 68 | static T cast(Object o) { 69 | return (T) o; 70 | } 71 | 72 | static Field tempField() { 73 | return new Field<>(""); 74 | } 75 | 76 | static Object encodeNull(Object o) { 77 | return o == null ? NIL : o; 78 | } 79 | 80 | static Object decodeNull(Object o) { 81 | return o == NIL ? null : o; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/io/avery/vinyl/Field.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2022 Daniel Avery 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | package io.avery.vinyl; 26 | 27 | import java.util.NoSuchElementException; 28 | import java.util.Objects; 29 | 30 | /** 31 | * An identifier used to access a typed value in a {@link Record record}. Fields are organized into record 32 | * {@link Header headers}, that may be shared by many records. 33 | * 34 | *

Fields use default object {@code equals()} and {@code hashCode()}. That is, two fields are only equal if they are 35 | * the same object. 36 | * 37 | * @param the value type of the field 38 | */ 39 | public final class Field { 40 | private final String name; 41 | 42 | /** 43 | * Creates a new field with the given name, used by the field's string representation. 44 | * 45 | * @param name the field name, used by the field's string representation. 46 | */ 47 | public Field(String name) { 48 | this.name = Objects.requireNonNull(name); 49 | } 50 | 51 | /** 52 | * Returns the value associated with this field in the given record, or throws {@link NoSuchElementException} if the 53 | * record's header does not contain this field. 54 | * 55 | *

This method is equivalent to {@code record.get(this)}, and is provided mainly to enable more concise method 56 | * references ({@code field::get}) in certain situations. 57 | * 58 | * @param record the record whose associated value for this field is to be returned 59 | * @return the value associated with this field 60 | * @throws NoSuchElementException if the record's header does not contain this field 61 | * @see Record#get(Field) 62 | */ 63 | public T get(Record record) { 64 | return record.get(this); 65 | } 66 | 67 | /** 68 | * Returns the field name 69 | * 70 | * @return the field name 71 | */ 72 | @Override 73 | public String toString() { 74 | return name; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /docs/javadoc/allpackages-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | All Packages 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 |

JavaScript is disabled on your browser.
22 | 23 |
24 | 46 |
47 |
48 |
49 |

All Packages

50 |
51 |
Package Summary
52 |
53 |
Package
54 |
Description
55 | 56 |
57 |
Classes to support relational-style operations on streams of elements, such as select, aggregate, and join 58 | transformations.
59 |
60 |
61 |
62 |
63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /docs/javadoc/legal/jquery.md: -------------------------------------------------------------------------------- 1 | ## jQuery v3.6.0 2 | 3 | ### jQuery License 4 | ``` 5 | jQuery v 3.6.0 6 | Copyright OpenJS Foundation and other contributors, https://openjsf.org/ 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | "Software"), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | 27 | ****************************************** 28 | 29 | The jQuery JavaScript Library v3.6.0 also includes Sizzle.js 30 | 31 | Sizzle.js includes the following license: 32 | 33 | Copyright JS Foundation and other contributors, https://js.foundation/ 34 | 35 | This software consists of voluntary contributions made by many 36 | individuals. For exact contribution history, see the revision history 37 | available at https://github.com/jquery/sizzle 38 | 39 | The following license applies to all parts of this software except as 40 | documented below: 41 | 42 | ==== 43 | 44 | Permission is hereby granted, free of charge, to any person obtaining 45 | a copy of this software and associated documentation files (the 46 | "Software"), to deal in the Software without restriction, including 47 | without limitation the rights to use, copy, modify, merge, publish, 48 | distribute, sublicense, and/or sell copies of the Software, and to 49 | permit persons to whom the Software is furnished to do so, subject to 50 | the following conditions: 51 | 52 | The above copyright notice and this permission notice shall be 53 | included in all copies or substantial portions of the Software. 54 | 55 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 56 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 57 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 58 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 59 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 60 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 61 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 62 | 63 | ==== 64 | 65 | All files located in the node_modules and external directories are 66 | externally maintained libraries used by this software which have their 67 | own licenses; we recommend you read them, as their terms may differ from 68 | the terms above. 69 | 70 | ********************* 71 | 72 | ``` 73 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-22.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | W-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

W

53 |
54 |
window(Consumer<SelectAPI.Window>) - Method in class io.avery.vinyl.SelectAPI
55 |
56 |
Configures a sub-configurator, that may define (or redefine) fields as analytic functions over partitions of the 57 | input stream.
58 |
59 |
60 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
61 |
62 |
63 | 64 | 65 | -------------------------------------------------------------------------------- /src/main/java/io/avery/vinyl/FieldPin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2022 Daniel Avery 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | package io.avery.vinyl; 26 | 27 | import java.util.NoSuchElementException; 28 | import java.util.Objects; 29 | 30 | /** 31 | * An object that associates a field with a header index, for optimized field value lookup. In other words, a 32 | * {@code FieldPin} "pins" a field to its index in some header. Record field value lookups using a field-pin are able to 33 | * skip computing the field index in the record header, by instead just checking that the header contains the pin's 34 | * field at the pin's index. 35 | * 36 | * @param the value type of the field 37 | */ 38 | public final class FieldPin { 39 | final Field field; 40 | final int index; 41 | 42 | /** 43 | * Creates a new {@code FieldPin} from the given field and index. 44 | * 45 | * @param field the field 46 | * @param index the index 47 | */ 48 | public FieldPin(Field field, int index) { 49 | this.field = Objects.requireNonNull(field); 50 | this.index = index; 51 | } 52 | 53 | /** 54 | * Returns the value associated with this pin's field in the given record, or throws {@link NoSuchElementException} 55 | * if the record's header does not contain this pin's field at this pin's index. 56 | * 57 | *

This method is equivalent to {@code record.get(this)}, and is provided mainly to enable more concise method 58 | * references ({@code pin::get}) in certain situations. 59 | * 60 | * @param record the record whose associated value for this pin's field is to be returned 61 | * @return the value associated with this pin's field 62 | * @throws NoSuchElementException if the record's header does not contain this pin's field at this pin's index 63 | * @see Record#get(FieldPin) 64 | */ 65 | public T get(Record record) { 66 | return record.get(this); 67 | } 68 | 69 | /** 70 | * Returns this pin's field. 71 | * 72 | * @return this pin's field 73 | */ 74 | public Field field() { 75 | return field; 76 | } 77 | 78 | /** 79 | * Returns this pin's index. 80 | * 81 | * @return this pin's index 82 | */ 83 | public int index() { 84 | return index; 85 | } 86 | 87 | /** 88 | * Returns {@code true} if and only if the given object is a field-pin with the same field and index as this field 89 | * pin. 90 | * 91 | * @param o the object to be compared for equality with this field-pin 92 | * @return {@code true} if the given object is equal to this field-pin 93 | */ 94 | @Override 95 | public boolean equals(Object o) { 96 | if (this == o) 97 | return true; 98 | if (!(o instanceof FieldPin)) 99 | return false; 100 | FieldPin other = (FieldPin) o; 101 | return field == other.field && index == other.index; 102 | } 103 | 104 | /** 105 | * Returns the hash code for this field-pin. The hash code of a field-pin is derived from the hash code of its field 106 | * and its index. 107 | * 108 | * @return the hash code for this field-pin 109 | */ 110 | @Override 111 | public int hashCode() { 112 | return 5331 * (field.hashCode() + index); 113 | } 114 | 115 | /** 116 | * Returns a string representation of this field-pin. The string representation of a field-pin is: 117 | * 118 | *

{@code
119 |      * field + " @ " + index
120 |      * }
121 | * 122 | * @return a string representation of this field-pin 123 | */ 124 | @Override 125 | public String toString() { 126 | return field + " @ " + index; 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-21.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | V-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

V

53 |
54 |
val(T) - Method in class io.avery.vinyl.JoinAPI.On
55 |
56 |
Creates a JoinExpr that evaluates to the given value.
57 |
58 |
values() - Method in class io.avery.vinyl.Record
59 |
60 |
Returns an unmodifiable view of the record field values.
61 |
62 |
63 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
64 |
65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /src/main/java/io/avery/vinyl/IntoAPI.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2022 Daniel Avery 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | package io.avery.vinyl; 26 | 27 | import java.util.*; 28 | import java.util.function.Consumer; 29 | import java.util.function.Function; 30 | import java.util.stream.Collector; 31 | import java.util.stream.Stream; 32 | 33 | /** 34 | * A configurator used to define a conversion from input elements to {@link Record records}. 35 | * 36 | *

Fields defined on the configurator become fields on a resultant {@link Header header}. The header fields are in 37 | * order of definition on the configurator. A field may be redefined on the configurator, in which case its definition 38 | * is replaced, but its original position in the header is retained. 39 | * 40 | * @see RecordStream.Aux#mapToRecord 41 | * @see RecordSet#collector 42 | * @param the type of input elements 43 | */ 44 | public class IntoAPI { 45 | private final Map, Integer> indexByField = new HashMap<>(); 46 | private final List> definitions = new ArrayList<>(); 47 | 48 | IntoAPI() {} // Prevent default public constructor 49 | 50 | /** 51 | * Defines (or redefines) the given field as the application of the given function to each input object. 52 | * 53 | * @param field the field 54 | * @param mapper a function to apply to each input object 55 | * @return this configurator 56 | * @param the value type of the field 57 | */ 58 | public IntoAPI field(Field field, Function mapper) { 59 | Objects.requireNonNull(field); 60 | Objects.requireNonNull(mapper); 61 | int index = indexByField.computeIfAbsent(field, k -> definitions.size()); 62 | Mapper def = new Mapper<>(index, mapper); 63 | if (index == definitions.size()) 64 | definitions.add(def); 65 | else 66 | definitions.set(index, def); 67 | return this; 68 | } 69 | 70 | RecordStream accept(RecordStream.Aux stream, Consumer> config) { 71 | config.accept(this); 72 | 73 | // Avoid picking up side-effects from bad-actor callbacks. 74 | Map, Integer> finalIndexByField = new HashMap<>(indexByField); 75 | @SuppressWarnings("unchecked") 76 | Mapper[] finalMappers = definitions.toArray(new Mapper[0]); 77 | 78 | // Prep the stream transformation. 79 | int size = finalMappers.length; 80 | Header nextHeader = new Header(finalIndexByField); 81 | Stream nextStream = stream.stream.map(it -> { 82 | Object[] arr = new Object[size]; 83 | for (Mapper mapper : finalMappers) 84 | mapper.accept(it, arr); 85 | return new Record(nextHeader, arr); 86 | }); 87 | 88 | return new RecordStream(nextHeader, nextStream); 89 | } 90 | 91 | Collector collector(Consumer> config) { 92 | config.accept(this); 93 | 94 | // Avoid picking up side-effects from bad-actor callbacks. 95 | Map, Integer> finalIndexByField = new HashMap<>(indexByField); 96 | @SuppressWarnings("unchecked") 97 | Mapper[] finalMappers = definitions.toArray(new Mapper[0]); 98 | 99 | int size = definitions.size(); 100 | return Collector.of( 101 | () -> new ArrayList(), 102 | (a, t) -> { 103 | Object[] arr = new Object[size]; 104 | for (Mapper mapper : finalMappers) 105 | mapper.accept(t, arr); 106 | a.add(arr); 107 | }, 108 | (a, b) -> { 109 | a.addAll(b); 110 | return a; 111 | }, 112 | a -> new RecordSet(new Header(finalIndexByField), a.toArray(new Object[0][])) 113 | ); 114 | } 115 | 116 | private static class Mapper { 117 | final int index; 118 | final Function mapper; 119 | 120 | Mapper(int index, Function mapper) { 121 | this.index = index; 122 | this.mapper = mapper; 123 | } 124 | 125 | void accept(T in, Object[] arr) { 126 | arr[index] = mapper.apply(in); 127 | } 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /src/main/java/io/avery/vinyl/Header.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2022 Daniel Avery 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | package io.avery.vinyl; 26 | 27 | import java.util.*; 28 | 29 | /** 30 | * An ordered, immutable collection of {@link Field fields} belonging to a single {@link Record record}, a 31 | * {@link RecordSet record-set}, or a {@link RecordStream record-stream}. Header fields are distinct from each other. 32 | */ 33 | public class Header { 34 | final Map, Integer> indexByField; 35 | final Field[] fields; 36 | 37 | Header(Map, Integer> indexByField) { 38 | this.indexByField = indexByField; 39 | this.fields = new Field[indexByField.size()]; 40 | indexByField.forEach((field, i) -> fields[i] = field); 41 | } 42 | 43 | /** 44 | * Returns the index of the given field in this header, or {@code -1} if this header does not contain the field. 45 | * 46 | * @param field the field to search for 47 | * @return the index of the given field in this header, or {@code -1} if this header does not contain the field 48 | */ 49 | public int indexOf(Field field) { 50 | Objects.requireNonNull(field); 51 | Integer index = indexByField.get(field); 52 | return index != null ? index : -1; 53 | } 54 | 55 | /** 56 | * Returns a {@link FieldPin pin} associating the given field with its index in this header, or throws 57 | * {@link NoSuchElementException} if this header does not contain the field. 58 | * 59 | * @param field the field to be pinned 60 | * @return a pin for the field 61 | * @param the value type of the field 62 | * @throws NoSuchElementException if this header does not contain the field 63 | */ 64 | public FieldPin pin(Field field) { 65 | Objects.requireNonNull(field); 66 | Integer index = indexByField.get(field); 67 | if (index == null) 68 | throw new NoSuchElementException("Invalid field: " + field); 69 | return new FieldPin<>(field, index); 70 | } 71 | 72 | /** 73 | * Returns an unmodifiable view of the header fields. 74 | * 75 | * @return the header fields 76 | */ 77 | public List> fields() { 78 | return Collections.unmodifiableList(Arrays.asList(fields)); 79 | } 80 | 81 | /** 82 | * On the given configurator, defines (or redefines) each field in this header as the lookup of the same field on 83 | * each input record. 84 | * 85 | *

This method behaves equivalently to: 86 | * 87 | *

{@code
 88 |      *     for (Field field : header.fields())
 89 |      *         config.field(field, field::get);
 90 |      * }
91 | * 92 | * @param config the configurator 93 | */ 94 | @SuppressWarnings({"unchecked", "rawtypes"}) 95 | public void selectAllFields(IntoAPI config) { 96 | for (Field field : fields) 97 | config.field(field, field::get); 98 | } 99 | 100 | /** 101 | * Returns {@code true} if and only if the given object is a header containing the same fields in the same order as 102 | * this header. 103 | * 104 | * @param o the object to be compared for equality with this header 105 | * @return {@code true} if the given object is equal to this header 106 | */ 107 | @Override 108 | public boolean equals(Object o) { 109 | if (this == o) 110 | return true; 111 | if (!(o instanceof Header)) 112 | return false; 113 | return Arrays.equals(fields, ((Header) o).fields); 114 | } 115 | 116 | /** 117 | * Returns the hash code value for this header. The hash code of a header is derived from the hash codes of each of 118 | * its fields. 119 | * 120 | * @return the hash code value for this header 121 | */ 122 | @Override 123 | public int hashCode() { 124 | return Arrays.hashCode(fields); 125 | } 126 | 127 | /** 128 | * Returns a string representation of this header. The string representation consists of the characters 129 | * {@code "Header"}, followed by the string representation of the header {@link #fields()}. 130 | * 131 | * @return a string representation of this header 132 | */ 133 | @Override 134 | public String toString() { 135 | return "Header" + Arrays.toString(fields); 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-20.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | U-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

U

53 |
54 |
unordered() - Method in class io.avery.vinyl.RecordStream.Aux
55 |
 
56 |
unordered() - Method in class io.avery.vinyl.RecordStream.AuxDouble
57 |
 
58 |
unordered() - Method in class io.avery.vinyl.RecordStream.AuxInt
59 |
 
60 |
unordered() - Method in class io.avery.vinyl.RecordStream.AuxLong
61 |
 
62 |
unordered() - Method in class io.avery.vinyl.RecordStream
63 |
 
64 |
65 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
66 |
67 |
68 | 69 | 70 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | B-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

B

53 |
54 |
between(JoinExpr<T>, JoinExpr<T>, JoinExpr<T>) - Method in class io.avery.vinyl.JoinAPI.On
55 |
56 |
Creates a JoinPred that passes if the value of the test expression lies between the values of the 57 | begin and end expressions.
58 |
59 |
boxed() - Method in class io.avery.vinyl.RecordStream.AuxDouble
60 |
 
61 |
boxed() - Method in class io.avery.vinyl.RecordStream.AuxInt
62 |
 
63 |
boxed() - Method in class io.avery.vinyl.RecordStream.AuxLong
64 |
 
65 |
66 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
67 |
68 |
69 | 70 | 71 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-15.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | O-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

O

53 |
54 |
onClose(Runnable) - Method in class io.avery.vinyl.RecordStream.Aux
55 |
 
56 |
onClose(Runnable) - Method in class io.avery.vinyl.RecordStream.AuxDouble
57 |
 
58 |
onClose(Runnable) - Method in class io.avery.vinyl.RecordStream.AuxInt
59 |
 
60 |
onClose(Runnable) - Method in class io.avery.vinyl.RecordStream.AuxLong
61 |
 
62 |
onClose(Runnable) - Method in class io.avery.vinyl.RecordStream
63 |
 
64 |
65 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
66 |
67 |
68 | 69 | 70 | -------------------------------------------------------------------------------- /docs/javadoc/script.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved. 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 | * 5 | * This code is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License version 2 only, as 7 | * published by the Free Software Foundation. Oracle designates this 8 | * particular file as subject to the "Classpath" exception as provided 9 | * by Oracle in the LICENSE file that accompanied this code. 10 | * 11 | * This code is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 | * version 2 for more details (a copy is included in the LICENSE file that 15 | * accompanied this code). 16 | * 17 | * You should have received a copy of the GNU General Public License version 18 | * 2 along with this work; if not, write to the Free Software Foundation, 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 | * 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 | * or visit www.oracle.com if you need additional information or have any 23 | * questions. 24 | */ 25 | 26 | var moduleSearchIndex; 27 | var packageSearchIndex; 28 | var typeSearchIndex; 29 | var memberSearchIndex; 30 | var tagSearchIndex; 31 | function loadScripts(doc, tag) { 32 | createElem(doc, tag, 'search.js'); 33 | 34 | createElem(doc, tag, 'module-search-index.js'); 35 | createElem(doc, tag, 'package-search-index.js'); 36 | createElem(doc, tag, 'type-search-index.js'); 37 | createElem(doc, tag, 'member-search-index.js'); 38 | createElem(doc, tag, 'tag-search-index.js'); 39 | } 40 | 41 | function createElem(doc, tag, path) { 42 | var script = doc.createElement(tag); 43 | var scriptElement = doc.getElementsByTagName(tag)[0]; 44 | script.src = pathtoroot + path; 45 | scriptElement.parentNode.insertBefore(script, scriptElement); 46 | } 47 | 48 | function show(tableId, selected, columns) { 49 | if (tableId !== selected) { 50 | document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') 51 | .forEach(function(elem) { 52 | elem.style.display = 'none'; 53 | }); 54 | } 55 | document.querySelectorAll('div.' + selected) 56 | .forEach(function(elem, index) { 57 | elem.style.display = ''; 58 | var isEvenRow = index % (columns * 2) < columns; 59 | elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); 60 | elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); 61 | }); 62 | updateTabs(tableId, selected); 63 | } 64 | 65 | function updateTabs(tableId, selected) { 66 | document.querySelector('div#' + tableId +' .summary-table') 67 | .setAttribute('aria-labelledby', selected); 68 | document.querySelectorAll('button[id^="' + tableId + '"]') 69 | .forEach(function(tab, index) { 70 | if (selected === tab.id || (tableId === selected && index === 0)) { 71 | tab.className = activeTableTab; 72 | tab.setAttribute('aria-selected', true); 73 | tab.setAttribute('tabindex',0); 74 | } else { 75 | tab.className = tableTab; 76 | tab.setAttribute('aria-selected', false); 77 | tab.setAttribute('tabindex',-1); 78 | } 79 | }); 80 | } 81 | 82 | function switchTab(e) { 83 | var selected = document.querySelector('[aria-selected=true]'); 84 | if (selected) { 85 | if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { 86 | // left or up arrow key pressed: move focus to previous tab 87 | selected.previousSibling.click(); 88 | selected.previousSibling.focus(); 89 | e.preventDefault(); 90 | } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { 91 | // right or down arrow key pressed: move focus to next tab 92 | selected.nextSibling.click(); 93 | selected.nextSibling.focus(); 94 | e.preventDefault(); 95 | } 96 | } 97 | } 98 | 99 | var updateSearchResults = function() {}; 100 | 101 | function indexFilesLoaded() { 102 | return moduleSearchIndex 103 | && packageSearchIndex 104 | && typeSearchIndex 105 | && memberSearchIndex 106 | && tagSearchIndex; 107 | } 108 | 109 | function copySnippet(button) { 110 | var textarea = document.createElement("textarea"); 111 | textarea.style.height = 0; 112 | document.body.appendChild(textarea); 113 | textarea.value = button.nextElementSibling.innerText; 114 | textarea.select(); 115 | document.execCommand("copy"); 116 | document.body.removeChild(textarea); 117 | var span = button.firstElementChild; 118 | var copied = span.getAttribute("data-copied"); 119 | if (span.innerHTML !== copied) { 120 | var initialLabel = span.innerHTML; 121 | span.innerHTML = copied; 122 | var parent = button.parentElement; 123 | parent.onmouseleave = parent.ontouchend = function() { 124 | span.innerHTML = initialLabel; 125 | }; 126 | } 127 | } 128 | 129 | // Workaround for scroll position not being included in browser history (8249133) 130 | document.addEventListener("DOMContentLoaded", function(e) { 131 | var contentDiv = document.querySelector("div.flex-content"); 132 | window.addEventListener("popstate", function(e) { 133 | if (e.state !== null) { 134 | contentDiv.scrollTop = e.state; 135 | } 136 | }); 137 | window.addEventListener("hashchange", function(e) { 138 | history.replaceState(contentDiv.scrollTop, document.title); 139 | }); 140 | contentDiv.addEventListener("scroll", function(e) { 141 | var timeoutID; 142 | if (!timeoutID) { 143 | timeoutID = setTimeout(function() { 144 | history.replaceState(contentDiv.scrollTop, document.title); 145 | timeoutID = null; 146 | }, 100); 147 | } 148 | }); 149 | if (!location.hash) { 150 | history.replaceState(contentDiv.scrollTop, document.title); 151 | } 152 | }); 153 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | io.avery 8 | vinyl 9 | 0.2-SNAPSHOT 10 | jar 11 | 12 | ${project.groupId}:${project.artifactId} 13 | Relational Streams for Java 14 | https://github.com/davery22/vinyl 15 | 16 | 17 | 18 | MIT License 19 | https://opensource.org/licenses/mit-license.php 20 | 21 | 22 | 23 | 24 | 25 | Daniel Avery 26 | danielaveryj@gmail.com 27 | https://github.com/davery22/ 28 | 29 | 30 | 31 | 32 | scm:git:git://github.com/davery22/vinyl.git 33 | scm:git:ssh://github.com:davery22/vinyl.git 34 | http://github.com/davery22/vinyl/tree/master 35 | 36 | 37 | 38 | UTF-8 39 | UTF-8 40 | 9 41 | 9 42 | 3.4.1 43 | 3.2.1 44 | 45 | 46 | 47 | 48 | org.junit.jupiter 49 | junit-jupiter-api 50 | 5.9.0 51 | test 52 | 53 | 54 | org.junit.jupiter 55 | junit-jupiter-engine 56 | 5.9.0 57 | test 58 | 59 | 60 | org.openjdk.jmh 61 | jmh-core 62 | 1.35 63 | test 64 | 65 | 66 | org.openjdk.jmh 67 | jmh-generator-annprocess 68 | 1.35 69 | test 70 | 71 | 72 | 73 | 74 | 75 | ossrh 76 | https://s01.oss.sonatype.org/content/repositories/snapshots 77 | 78 | 79 | ossrh 80 | https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ 81 | 82 | 83 | 84 | 85 | 86 | 87 | org.sonatype.plugins 88 | nexus-staging-maven-plugin 89 | 1.6.13 90 | true 91 | 92 | ossrh 93 | https://s01.oss.sonatype.org/ 94 | true 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | sonatype-oss-release 103 | 104 | 105 | 106 | org.apache.maven.plugins 107 | maven-source-plugin 108 | ${maven-source-plugin.version} 109 | 110 | 111 | attach-sources 112 | 113 | jar-no-fork 114 | 115 | 116 | 117 | 118 | 119 | org.apache.maven.plugins 120 | maven-javadoc-plugin 121 | ${maven-javadoc-plugin.version} 122 | 123 | true 124 | 9 125 | 126 | 127 | 128 | attach-javadocs 129 | 130 | jar 131 | 132 | 133 | 134 | 135 | 136 | org.apache.maven.plugins 137 | maven-gpg-plugin 138 | 3.0.1 139 | 140 | 141 | sign-artifacts 142 | verify 143 | 144 | sign 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | -------------------------------------------------------------------------------- /docs/javadoc/io/avery/vinyl/JoinPred.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JoinPred 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 80 |
81 |
82 | 83 |
84 | 85 |

Class JoinPred

86 |
87 |
java.lang.Object 88 |
io.avery.vinyl.JoinPred
89 |
90 |
91 |
92 |
public class JoinPred 93 | extends Object
94 |
An opaque value representing a predicate defined by JoinAPI.On.
95 |
96 |
97 | 108 |
109 | 110 |
111 |
112 |
113 | 114 | 115 | -------------------------------------------------------------------------------- /src/main/java/io/avery/vinyl/RecordSet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2022 Daniel Avery 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | package io.avery.vinyl; 26 | 27 | import java.util.Arrays; 28 | import java.util.function.Consumer; 29 | import java.util.stream.Collector; 30 | 31 | /** 32 | * An ordered collection of {@link Record records} with a common {@link Header header}. Record-sets offer compact 33 | * storage for such records, and allow for records to be accessed repeatedly, unlike {@link RecordStream record-streams}. 34 | */ 35 | public class RecordSet { 36 | private final Header header; 37 | private final Object[][] records; 38 | 39 | RecordSet(Header header, Object[][] records) { 40 | this.header = header; 41 | this.records = records; 42 | } 43 | 44 | /** 45 | * Returns the header shared by all records in this record-set. 46 | * 47 | * @return the header shared by all records at this record-set 48 | */ 49 | public Header header() { 50 | return header; 51 | } 52 | 53 | /** 54 | * Returns a sequential {@code Stream} with this record-set as its source. 55 | * 56 | * @return a sequential {@code Stream} over the records in this record-set 57 | */ 58 | public RecordStream stream() { 59 | return new RecordStream(header, Arrays.stream(records).map(values -> new Record(header, values))); 60 | } 61 | 62 | /** 63 | * Returns the number of records in this record-set. 64 | * 65 | * @return the number of records in this record-set 66 | */ 67 | public int size() { 68 | return records.length; 69 | } 70 | 71 | /** 72 | * Returns {@code true} if this record-set contains no records. 73 | * 74 | * @return {@code true} if this record-set contains no records 75 | */ 76 | public boolean isEmpty() { 77 | return records.length == 0; 78 | } 79 | 80 | /** 81 | * Returns a {@code Collector} that accumulates the input elements into a new {@code RecordSet}, mapping each input 82 | * element to a record as configured by the given configurator consumer. 83 | * 84 | * @param config a consumer that configures the record fields 85 | * @return a {@code Collector} which collects all the input elements into a {@code RecordSet}, in encounter order 86 | * @param the type of the input elements 87 | */ 88 | public static Collector collector(Consumer> config) { 89 | return new IntoAPI().collector(config); 90 | } 91 | 92 | /** 93 | * Returns {@code true} if and only if the given object is a record-set with a header equal to this set's header, 94 | * and the object contains records equal to this set's records, in the same order as this set. 95 | * 96 | * @param o the object to be compared for equality with this record-set 97 | * @return {@code true} if the given object is equal to this record-set 98 | */ 99 | @Override 100 | public boolean equals(Object o) { 101 | if (this == o) 102 | return true; 103 | if (!(o instanceof RecordSet)) 104 | return false; 105 | RecordSet other = (RecordSet) o; 106 | if (!header.equals(other.header)) 107 | return false; 108 | int length = records.length; 109 | if (length != other.records.length) 110 | return false; 111 | for (int i = 0; i < length; i++) 112 | if (!Arrays.equals(records[i], other.records[i])) 113 | return false; 114 | return true; 115 | } 116 | 117 | /** 118 | * Returns the hash code value for this record-set. The hash code of a record-set is derived from the hash code of 119 | * its header and the hash codes of each of its records. 120 | * 121 | * @return the hash code value for this record-set 122 | */ 123 | @Override 124 | public int hashCode() { 125 | int result = header.hashCode(); 126 | for (Object[] arr : records) 127 | result = 31 * result + Arrays.hashCode(arr); 128 | return result; 129 | } 130 | 131 | /** 132 | * Returns a string representation of this record-set. The string representation consists of the characters 133 | * {@code "RecordSet"}, followed by an array-of-arrays. The first inner array lists the header fields in order, 134 | * comma-separated. The remaining inner arrays list each record's values in order, comma-separated. The inner arrays 135 | * are separated by a comma, newline, and tab. Fields and values are converted to strings as by 136 | * {@link String#valueOf(Object)}. For example: 137 | * 138 | *
{@code
139 |      * RecordSet[
140 |      *     [field.a, field.b, field.c],
141 |      *     [value1.a, value1.b, value1.c],
142 |      *     [value2.a, value2.b, value2.c],
143 |      *     [value3.a, value3.b, value3.c]
144 |      * ]
145 |      * }
146 | * 147 | * @return a string representation of this record-set. 148 | */ 149 | @Override 150 | public String toString() { 151 | StringBuilder sb = new StringBuilder("RecordSet[\n\t["); 152 | String delimiter = ""; 153 | for (Field field : header.fields) { 154 | sb.append(delimiter).append(field); 155 | delimiter = ", "; 156 | } 157 | sb.append(']'); 158 | for (Object[] values : records) { 159 | sb.append(",\n\t["); 160 | delimiter = ""; 161 | for (Object val : values) { 162 | sb.append(delimiter).append(val); 163 | delimiter = ", "; 164 | } 165 | sb.append(']'); 166 | } 167 | return sb.append("\n]").toString(); 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /docs/javadoc/io/avery/vinyl/JoinExpr.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JoinExpr 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 80 |
81 |
82 | 83 |
84 | 85 |

Class JoinExpr<T>

86 |
87 |
java.lang.Object 88 |
io.avery.vinyl.JoinExpr<T>
89 |
90 |
91 |
92 |
Type Parameters:
93 |
T - the type of the evaluated expression
94 |
95 |
96 |
public class JoinExpr<T> 97 | extends Object
98 |
An opaque value representing an expression defined by JoinAPI.On.
99 |
100 |
101 | 112 |
113 | 114 |
115 |
116 |
117 | 118 | 119 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-8.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | H-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

H

53 |
54 |
hashCode() - Method in class io.avery.vinyl.FieldPin
55 |
56 |
Returns the hash code for this field-pin.
57 |
58 |
hashCode() - Method in class io.avery.vinyl.Header
59 |
60 |
Returns the hash code value for this header.
61 |
62 |
hashCode() - Method in class io.avery.vinyl.Record
63 |
64 |
Returns the hash code value for this record.
65 |
66 |
hashCode() - Method in class io.avery.vinyl.RecordSet
67 |
68 |
Returns the hash code value for this record-set.
69 |
70 |
header() - Method in class io.avery.vinyl.Record
71 |
72 |
Returns the record header.
73 |
74 |
header() - Method in class io.avery.vinyl.RecordSet
75 |
76 |
Returns the header shared by all records in this record-set.
77 |
78 |
header() - Method in class io.avery.vinyl.RecordStream
79 |
80 |
Returns the header shared by all records at this stage in the stream pipeline.
81 |
82 |
Header - Class in io.avery.vinyl
83 |
84 |
An ordered, immutable collection of fields belonging to a single record, a 85 | record-set, or a record-stream.
86 |
87 |
88 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
89 |
90 |
91 | 92 | 93 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | E-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

E

53 |
54 |
eq(JoinExpr<?>, JoinExpr<?>) - Method in class io.avery.vinyl.JoinAPI.On
55 |
56 |
Creates a JoinPred that passes if the value of the left expression is equal to the value of the right 57 | expression, based on Objects.equals(Object, Object).
58 |
59 |
equals(Object) - Method in class io.avery.vinyl.FieldPin
60 |
61 |
Returns true if and only if the given object is a field-pin with the same field and index as this field 62 | pin.
63 |
64 |
equals(Object) - Method in class io.avery.vinyl.Header
65 |
66 |
Returns true if and only if the given object is a header containing the same fields in the same order as 67 | this header.
68 |
69 |
equals(Object) - Method in class io.avery.vinyl.Record
70 |
71 |
Returns true if and only if the given object is a record with a header and values equal to this record's 72 | header and values, respectively.
73 |
74 |
equals(Object) - Method in class io.avery.vinyl.RecordSet
75 |
76 |
Returns true if and only if the given object is a record-set with a header equal to this set's header, 77 | and the object contains records equal to this set's records, in the same order as this set.
78 |
79 |
eval(Supplier<T>) - Method in class io.avery.vinyl.JoinAPI.On
80 |
81 |
Creates a JoinExpr that evaluates to the result of calling the given supplier.
82 |
83 |
84 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
85 |
86 |
87 | 88 | 89 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-10.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | J-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

J

53 |
54 |
join(RecordStream, Function<JoinAPI.On, JoinPred>, Consumer<JoinAPI.Select>) - Method in class io.avery.vinyl.RecordStream
55 |
56 |
Returns a stream that performs an inner join between this (left) stream and the given right stream.
57 |
58 |
JoinAPI - Class in io.avery.vinyl
59 |
60 |
A configurator used to define a relational join operation between a left and a right 61 | record-stream.
62 |
63 |
JoinAPI.On - Class in io.avery.vinyl
64 |
65 |
A sub-configurator used to define the join condition of a relational join operation.
66 |
67 |
JoinAPI.Select - Class in io.avery.vinyl
68 |
69 |
A sub-configurator used to define the output fields of a relational join operation.
70 |
71 |
JoinAPI.Select.Fields<T> - Class in io.avery.vinyl
72 |
73 |
A sub-configurator used to define output fields of a relational join operation that depend on a common 74 | intermediate result.
75 |
76 |
JoinExpr<T> - Class in io.avery.vinyl
77 |
78 |
An opaque value representing an expression defined by JoinAPI.On.
79 |
80 |
JoinPred - Class in io.avery.vinyl
81 |
82 |
An opaque value representing a predicate defined by JoinAPI.On.
83 |
84 |
85 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
86 |
87 |
88 | 89 | 90 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-14.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | N-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

N

53 |
54 |
neq(JoinExpr<?>, JoinExpr<?>) - Method in class io.avery.vinyl.JoinAPI.On
55 |
56 |
Creates a JoinPred that passes if the value of the left expression is not equal to the value of the 57 | right expression, based on Objects.equals(Object, Object).
58 |
59 |
noneMatch(DoublePredicate) - Method in class io.avery.vinyl.RecordStream.AuxDouble
60 |
 
61 |
noneMatch(IntPredicate) - Method in class io.avery.vinyl.RecordStream.AuxInt
62 |
 
63 |
noneMatch(LongPredicate) - Method in class io.avery.vinyl.RecordStream.AuxLong
64 |
 
65 |
noneMatch(Predicate<? super Record>) - Method in class io.avery.vinyl.RecordStream
66 |
 
67 |
noneMatch(Predicate<? super T>) - Method in class io.avery.vinyl.RecordStream.Aux
68 |
 
69 |
not(JoinPred) - Method in class io.avery.vinyl.JoinAPI.On
70 |
71 |
Creates a JoinPred that passes if the given predicate does not pass.
72 |
73 |
nTile(long, int) - Static method in class io.avery.vinyl.Analytics
74 |
75 |
Returns an analytic function that distributes records in the partition into the given n number of groups.
76 |
77 |
78 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
79 |
80 |
81 | 82 | 83 | -------------------------------------------------------------------------------- /src/main/java/io/avery/vinyl/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MIT License 3 | * 4 | * Copyright (c) 2022 Daniel Avery 5 | * 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy 7 | * of this software and associated documentation files (the "Software"), to deal 8 | * in the Software without restriction, including without limitation the rights 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | * copies of the Software, and to permit persons to whom the Software is 11 | * furnished to do so, subject to the following conditions: 12 | * 13 | * The above copyright notice and this permission notice shall be included in all 14 | * copies or substantial portions of the Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | * SOFTWARE. 23 | */ 24 | 25 | /** 26 | * Classes to support relational-style operations on streams of elements, such as select, aggregate, and join 27 | * transformations. The elements are represented as immutable "record" objects, which have their "fields" defined by a 28 | * relational operation, rather than a class declaration. For example: 29 | * 30 | *
{@code
 31 |  *     Field userAge = new Field<>("userAge");
 32 |  *     Field userAccountAge = new Field<>("userAccountAge");
 33 |  *     Field countUsers = new Field<>("countUsers");
 34 |  *     Field avgAccountAge = new Field<>("avgAccountAge");
 35 |  *
 36 |  *     RecordSet data = RecordStream.aux(users.stream())
 37 |  *         .mapToRecord(into -> into
 38 |  *             .field(userAge, user -> ChronoUnit.YEARS.between(user.getBirthDate(), LocalDate.now()))
 39 |  *             .field(userAccountAge, user -> ChronoUnit.YEARS.between(user.getAccountStartDate(), LocalDate.now()))
 40 |  *         )
 41 |  *         .aggregate(aggregate -> aggregate
 42 |  *             .keyField(userAge)
 43 |  *             .aggField(countUsers, Collectors.counting())
 44 |  *             .aggField(avgAccountAge, Collectors.averagingLong(record -> record.get(userAccountAge)))
 45 |  *         )
 46 |  *         .toRecordSet();
 47 |  * }
48 | * 49 | *

Here we first define a few fields to use in subsequent relational operations, giving types for those fields. Then 50 | * we take a stream of {@code users}, transform it to a stream of records, and perform a grouped aggregation yielding a 51 | * new stream of records, which we finally collect into a {@code RecordSet}. 52 | * 53 | *

Records, Headers, and Fields

54 | * 55 | *

{@code Record} is a central abstraction in Vinyl. A record is a shallowly-immutable carrier for a fixed set of 56 | * values, not unlike a {@code java.lang.Record} in Java 16+. However, Vinyl Records are not open to extension, and do 57 | * not declare any fields on the class. Instead, records are internally instantiated with a {@code Header} and a set of 58 | * values. The header defines what "fields" the record contains, and the values correspond to those fields. This allows 59 | * relational operations to dynamically define new combinations of fields for resulting records. 60 | * 61 | *

Each "field" in the record header is represented as a {@code Field}. A field is an opaque object with a 62 | * parameterized type - the type of values that a record may associate with that field. The field is used to access its 63 | * value on a record, similar to how normal fields are used to access values on an object. This ensures value access is 64 | * type-safe. 65 | * 66 | *

Auxiliary Streams

67 | * 68 | *

In the above "user aggregate" example, we first had to wrap the default {@code Stream} of users in a 69 | * {@code RecordStream.Aux}. This wrapper-stream extends the default stream with the {@code mapToRecord()} method, which 70 | * enables transformation into a {@code RecordStream}. Rather than have a static method to do this, using a 71 | * wrapper-stream allows for going back and forth between the stream types seamlessly. Other wrapper-stream types are 72 | * provided for each of the primitive stream types, ie {@code RecordStream.AuxInt}, {@code RecordStream.AuxLong}, and 73 | * {@code RecordStream.AuxDouble}. Existing stream operations that return a stream are overridden to return one of these 74 | * wrapper types. 75 | * 76 | *

RecordStreams and RecordSets

77 | * 78 | *

A {@code RecordStream} is a stream of records sharing the same header. Record-streams extend normal streams with 79 | * relational operations like {@code select()}, {@code aggregate()}, and {@code join()}, which transform the header and 80 | * records in the stream. 81 | * 82 | *

A {@code RecordSet} stores records sharing the same header. Record-streams can be collected into record-sets, 83 | * allowing the records to be trivially re-streamed later, possibly multiple times. 84 | * 85 | *

Configurators

86 | * 87 | *

Relational operations on a record-stream expose "configurators", which configure how the operation is executed. 88 | * For example, configurators are used to define the output fields of a {@code select()} operation, the join condition 89 | * of a {@code join()} operation, and the grouping keys of an {@code aggregate()} operation. Configurators may expose 90 | * sub-configurators for handling isolated specifics of the overall operation. To demonstrate: 91 | * 92 | *

{@code
 93 |  *     RecordStream stream = scoresStream
 94 |  *         .select(select -> select
 95 |  *             .field(points)
 96 |  *             .window(window -> window
 97 |  *                 .field(averagePoints, Analytics.fromAgg(Collectors.averagingLong(points::get)))
 98 |  *                 .fields(Comparator.comparingLong(points::get), fields -> fields
 99 |  *                     .field(discreteMedian, Analytics.percentileDisc(0.5, points::get))
100 |  *                     .field(continuousMedian, Analytics.percentileCont(0.5, points::get))
101 |  *                 )
102 |  *             )
103 |  *         );
104 |  * }
105 | * 106 | *

Here, the {@code select}, {@code window}, and {@code fields} configurators (named after the methods that introduce 107 | * them) are used to configure the overall {@code select()} operation. The {@code window} configurator is a 108 | * sub-configurator of {@code select}, and the {@code fields} configurator is a sub-configurator of {@code window}. 109 | * Together these configurators define four fields on the resultant record-stream: {@code points}, 110 | * {@code averagePoints}, {@code discreteMedian}, {@code continuousMedian}. 111 | * 112 | *

Notable Discrepancies

113 | * 114 | *

Vinyl does not support three-valued logic. The 115 | * value {@code null} is just {@code null}; there is generally no special handling. However, internal comparators (as 116 | * used by {@link io.avery.vinyl.RecordStream#sorted()} and certain {@link io.avery.vinyl.JoinAPI.On} operators) are 117 | * adapted to treat {@code null} as a first/lowest value. Additionally, {@link io.avery.vinyl.Record#isNil()} is 118 | * provided to identify when an outer {@code join()} operation introduces a record of all {@code null} values. 119 | */ 120 | package io.avery.vinyl; -------------------------------------------------------------------------------- /docs/javadoc/io/avery/vinyl/package-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | io.avery.vinyl Class Hierarchy 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 |

JavaScript is disabled on your browser.
22 | 23 |
24 | 46 |
47 |
48 |
49 |

Hierarchy For Package io.avery.vinyl

50 |
51 |
52 |

Class Hierarchy

53 | 86 |
87 |
88 |
89 |
90 | 91 | 92 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | D-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

D

53 |
54 |
denseRank(long, Comparator<? super Record>) - Static method in class io.avery.vinyl.Analytics
55 |
56 |
Returns an analytic function that emits a rank for each record in the partition, by starting with the given first 57 | rank and assigning the same rank to consecutive tied records, incrementing the rank by one when the tie is 58 | broken.
59 |
60 |
distinct() - Method in class io.avery.vinyl.RecordStream.Aux
61 |
 
62 |
distinct() - Method in class io.avery.vinyl.RecordStream.AuxDouble
63 |
 
64 |
distinct() - Method in class io.avery.vinyl.RecordStream.AuxInt
65 |
 
66 |
distinct() - Method in class io.avery.vinyl.RecordStream.AuxLong
67 |
 
68 |
distinct() - Method in class io.avery.vinyl.RecordStream
69 |
 
70 |
dropWhile(DoublePredicate) - Method in class io.avery.vinyl.RecordStream.AuxDouble
71 |
 
72 |
dropWhile(IntPredicate) - Method in class io.avery.vinyl.RecordStream.AuxInt
73 |
 
74 |
dropWhile(LongPredicate) - Method in class io.avery.vinyl.RecordStream.AuxLong
75 |
 
76 |
dropWhile(Predicate<? super Record>) - Method in class io.avery.vinyl.RecordStream
77 |
 
78 |
dropWhile(Predicate<? super T>) - Method in class io.avery.vinyl.RecordStream.Aux
79 |
 
80 |
81 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
82 |
83 |
84 | 85 | 86 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-7.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | G-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

G

53 |
54 |
get(Field<T>) - Method in class io.avery.vinyl.Record
55 |
56 |
Returns the value associated with the given field in this record, or throws NoSuchElementException if 57 | this record's header does not contain the field.
58 |
59 |
get(FieldPin<T>) - Method in class io.avery.vinyl.Record
60 |
61 |
Returns the value associated with the given pin's field in this record, or throws NoSuchElementException 62 | if this record's header does not contain the pin's field at the pin's index.
63 |
64 |
get(Record) - Method in class io.avery.vinyl.Field
65 |
66 |
Returns the value associated with this field in the given record, or throws NoSuchElementException if the 67 | record's header does not contain this field.
68 |
69 |
get(Record) - Method in class io.avery.vinyl.FieldPin
70 |
71 |
Returns the value associated with this pin's field in the given record, or throws NoSuchElementException 72 | if the record's header does not contain this pin's field at this pin's index.
73 |
74 |
gt(JoinExpr<T>, JoinExpr<T>) - Method in class io.avery.vinyl.JoinAPI.On
75 |
76 |
Creates a JoinPred that passes if the value of the left expression compares greater than the value of 77 | the right expression, based on the natural ordering of the values (nulls first/lowest).
78 |
79 |
gte(JoinExpr<T>, JoinExpr<T>) - Method in class io.avery.vinyl.JoinAPI.On
80 |
81 |
Creates a JoinPred that passes if the value of the left expression compares greater than or equal to 82 | the value of the right expression, based on the natural ordering of the values (nulls first/lowest).
83 |
84 |
85 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
86 |
87 |
88 | 89 | 90 | -------------------------------------------------------------------------------- /docs/javadoc/overview-tree.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Class Hierarchy 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Hierarchy For All Packages

50 | Package Hierarchies: 51 | 54 |
55 |
56 |

Class Hierarchy

57 | 90 |
91 |
92 |
93 |
94 | 95 | 96 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-9.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | I-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

I

53 |
54 |
index() - Method in class io.avery.vinyl.FieldPin
55 |
56 |
Returns this pin's index.
57 |
58 |
indexOf(Field<?>) - Method in class io.avery.vinyl.Header
59 |
60 |
Returns the index of the given field in this header, or -1 if this header does not contain the field.
61 |
62 |
IntoAPI<T> - Class in io.avery.vinyl
63 |
64 |
A configurator used to define a conversion from input elements to records.
65 |
66 |
io.avery.vinyl - package io.avery.vinyl
67 |
68 |
Classes to support relational-style operations on streams of elements, such as select, aggregate, and join 69 | transformations.
70 |
71 |
isNil() - Method in class io.avery.vinyl.Record
72 |
73 |
Returns true if this is a "nil" record that was synthesized to pair with an unmatched record in an outer 74 | (left/right/full) join.
75 |
76 |
isParallel() - Method in class io.avery.vinyl.RecordStream.Aux
77 |
 
78 |
isParallel() - Method in class io.avery.vinyl.RecordStream.AuxDouble
79 |
 
80 |
isParallel() - Method in class io.avery.vinyl.RecordStream.AuxInt
81 |
 
82 |
isParallel() - Method in class io.avery.vinyl.RecordStream.AuxLong
83 |
 
84 |
isParallel() - Method in class io.avery.vinyl.RecordStream
85 |
 
86 |
iterator() - Method in class io.avery.vinyl.RecordStream.Aux
87 |
 
88 |
iterator() - Method in class io.avery.vinyl.RecordStream.AuxDouble
89 |
 
90 |
iterator() - Method in class io.avery.vinyl.RecordStream.AuxInt
91 |
 
92 |
iterator() - Method in class io.avery.vinyl.RecordStream.AuxLong
93 |
 
94 |
iterator() - Method in class io.avery.vinyl.RecordStream
95 |
 
96 |
97 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
98 |
99 |
100 | 101 | 102 | -------------------------------------------------------------------------------- /docs/javadoc/help-doc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | API Help 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 62 |
63 |
64 |

JavaDoc Help

65 | 83 |
84 |
85 |

Navigation

86 | Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces 87 | 97 |
98 |
99 |
100 |

Kinds of Pages

101 | The following sections describe the different kinds of pages in this collection. 102 |
103 |

Package

104 |

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

105 |
    106 |
  • Interfaces
  • 107 |
  • Classes
  • 108 |
  • Enums
  • 109 |
  • Exception Classes
  • 110 |
  • Annotation Types
  • 111 |
112 |
113 |
114 |

Class or Interface

115 |

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

116 |
    117 |
  • Class Inheritance Diagram
  • 118 |
  • Direct Subclasses
  • 119 |
  • All Known Subinterfaces
  • 120 |
  • All Known Implementing Classes
  • 121 |
  • Class or Interface Declaration
  • 122 |
  • Class or Interface Description
  • 123 |
124 |
125 |
    126 |
  • Nested Class Summary
  • 127 |
  • Enum Constant Summary
  • 128 |
  • Field Summary
  • 129 |
  • Property Summary
  • 130 |
  • Constructor Summary
  • 131 |
  • Method Summary
  • 132 |
  • Required Element Summary
  • 133 |
  • Optional Element Summary
  • 134 |
135 |
136 |
    137 |
  • Enum Constant Details
  • 138 |
  • Field Details
  • 139 |
  • Property Details
  • 140 |
  • Constructor Details
  • 141 |
  • Method Details
  • 142 |
  • Element Details
  • 143 |
144 |

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

145 |

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

146 |
147 |
148 |

Other Files

149 |

Packages and modules may contain pages with additional information related to the declarations nearby.

150 |
151 |
152 |

Tree (Class Hierarchy)

153 |

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

154 |
    155 |
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • 156 |
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • 157 |
158 |
159 |
160 |

All Packages

161 |

The All Packages page contains an alphabetic index of all packages contained in the documentation.

162 |
163 |
164 |

All Classes and Interfaces

165 |

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

166 |
167 |
168 |

Index

169 |

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

170 |
171 |
172 |
173 | This help file applies to API documentation generated by the standard doclet.
174 |
175 |
176 | 177 | 178 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-19.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | T-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

T

53 |
54 |
takeWhile(DoublePredicate) - Method in class io.avery.vinyl.RecordStream.AuxDouble
55 |
 
56 |
takeWhile(IntPredicate) - Method in class io.avery.vinyl.RecordStream.AuxInt
57 |
 
58 |
takeWhile(LongPredicate) - Method in class io.avery.vinyl.RecordStream.AuxLong
59 |
 
60 |
takeWhile(Predicate<? super Record>) - Method in class io.avery.vinyl.RecordStream
61 |
 
62 |
takeWhile(Predicate<? super T>) - Method in class io.avery.vinyl.RecordStream.Aux
63 |
 
64 |
toArray() - Method in class io.avery.vinyl.RecordStream.Aux
65 |
 
66 |
toArray() - Method in class io.avery.vinyl.RecordStream.AuxDouble
67 |
 
68 |
toArray() - Method in class io.avery.vinyl.RecordStream.AuxInt
69 |
 
70 |
toArray() - Method in class io.avery.vinyl.RecordStream.AuxLong
71 |
 
72 |
toArray() - Method in class io.avery.vinyl.RecordStream
73 |
 
74 |
toArray(IntFunction<A[]>) - Method in class io.avery.vinyl.RecordStream.Aux
75 |
 
76 |
toArray(IntFunction<A[]>) - Method in class io.avery.vinyl.RecordStream
77 |
 
78 |
toRecordSet() - Method in class io.avery.vinyl.RecordStream
79 |
80 |
Accumulates the records of this stream into a RecordSet.
81 |
82 |
toString() - Method in class io.avery.vinyl.Field
83 |
84 |
Returns the field name
85 |
86 |
toString() - Method in class io.avery.vinyl.FieldPin
87 |
88 |
Returns a string representation of this field-pin.
89 |
90 |
toString() - Method in class io.avery.vinyl.Header
91 |
92 |
Returns a string representation of this header.
93 |
94 |
toString() - Method in class io.avery.vinyl.Record
95 |
96 |
Returns a string representation of this record.
97 |
98 |
toString() - Method in class io.avery.vinyl.RecordSet
99 |
100 |
Returns a string representation of this record-set.
101 |
102 |
103 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
104 |
105 |
106 | 107 | 108 | -------------------------------------------------------------------------------- /docs/javadoc/io/avery/vinyl/JoinAPI.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | JoinAPI 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 80 |
81 |
82 | 83 |
84 | 85 |

Class JoinAPI

86 |
87 |
java.lang.Object 88 |
io.avery.vinyl.JoinAPI
89 |
90 |
91 |
92 |
public class JoinAPI 93 | extends Object
94 |
A configurator used to define a relational join operation between a left and a right 95 | record-stream. 96 | 97 |

A join operation streams the left-side, and for each left-side record, searches the right-side for matching 98 | records such that the (left, right) pair of records satisfy a configured join condition. When a match is found, a 99 | resulting record is created as configured and emitted downstream. The returned stream will have a new header, shared 100 | by the new records. 101 | 102 |

The configurator consists of two sub-configurators: a JoinAPI.On that defines the join condition, and a 103 | JoinAPI.Select that defines the output fields.

104 |
105 |
See Also:
106 |
107 | 113 |
114 |
115 |
116 |
117 |
    118 | 119 |
  • 120 |
    121 |

    Nested Class Summary

    122 |
    Nested Classes
    123 |
    124 |
    Modifier and Type
    125 |
    Class
    126 |
    Description
    127 |
    class 
    128 | 129 |
    130 |
    A sub-configurator used to define the join condition of a relational join operation.
    131 |
    132 |
    class 
    133 | 134 |
    135 |
    A sub-configurator used to define the output fields of a relational join operation.
    136 |
    137 |
    138 |
    139 |
  • 140 | 141 |
  • 142 |
    143 |

    Method Summary

    144 |
    145 |

    Methods inherited from class java.lang.Object

    146 | clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    147 |
    148 |
  • 149 |
150 |
151 | 152 |
153 |
154 |
155 | 156 | 157 | -------------------------------------------------------------------------------- /docs/javadoc/index-files/index-11.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | K-Index 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 20 | 23 |
24 | 46 |
47 |
48 |
49 |

Index

50 |
51 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages 52 |

K

53 |
54 |
key(Field<?>) - Method in class io.avery.vinyl.AggregateAPI
55 |
56 |
Defines a key as the lookup of the given field on each input record.
57 |
58 |
key(Field<?>) - Method in class io.avery.vinyl.SelectAPI.Window
59 |
60 |
Defines a key as the lookup of the given field on each input record.
61 |
62 |
key(Function<? super Record, ?>) - Method in class io.avery.vinyl.AggregateAPI
63 |
64 |
Defines a key as the application of the given function to each input record.
65 |
66 |
key(Function<? super Record, ?>) - Method in class io.avery.vinyl.SelectAPI.Window
67 |
68 |
Defines a key as the application of the given function to each input record.
69 |
70 |
key(Function<? super T, ?>) - Method in class io.avery.vinyl.AggregateAPI.Keys
71 |
72 |
Defines a key as the application of the given function to this sub-configurator's intermediate result.
73 |
74 |
key(Function<? super T, ?>) - Method in class io.avery.vinyl.SelectAPI.Window.Keys
75 |
76 |
Defines a key as the application of the given function to this sub-configurator's intermediate result.
77 |
78 |
keyField(Field<?>) - Method in class io.avery.vinyl.AggregateAPI
79 |
80 |
Defines (or redefines) the given field as a key that looks up the same field on each input record.
81 |
82 |
keyField(Field<T>, Function<? super Record, ? extends T>) - Method in class io.avery.vinyl.AggregateAPI
83 |
84 |
Defines (or redefines) the given field as a key that applies the given function to each input record.
85 |
86 |
keyField(Field<U>, Function<? super T, ? extends U>) - Method in class io.avery.vinyl.AggregateAPI.Keys
87 |
88 |
Defines (or redefines) a field as a key that applies the given function to this sub-configurator's 89 | intermediate result.
90 |
91 |
keyFields(Field<?>...) - Method in class io.avery.vinyl.AggregateAPI
92 |
93 |
Defines (or redefines) each of the given fields as keys that look up the same field on each input record.
94 |
95 |
keys(Field<?>...) - Method in class io.avery.vinyl.AggregateAPI
96 |
97 |
Defines keys from each of the given fields, as the lookup of the same field on each input record.
98 |
99 |
keys(Field<?>...) - Method in class io.avery.vinyl.SelectAPI.Window
100 |
101 |
Defines keys from each of the given fields, as the lookup of the same field on each input record.
102 |
103 |
keys(Function<? super Record, ? extends T>, Consumer<AggregateAPI.Keys<T>>) - Method in class io.avery.vinyl.AggregateAPI
104 |
105 |
Configures a sub-configurator, that may define (or redefine) keys in terms of the result of applying the given 106 | function to each input record.
107 |
108 |
keys(Function<? super Record, ? extends T>, Consumer<SelectAPI.Window.Keys<T>>) - Method in class io.avery.vinyl.SelectAPI.Window
109 |
110 |
Configures a sub-configurator, that may define keys in terms of the result of applying the given function to 111 | each input record.
112 |
113 |
114 | A B C D E F G H I J K L M N O P R S T U V W 
All Classes and Interfaces|All Packages
115 |
116 |
117 | 118 | 119 | --------------------------------------------------------------------------------