Build: Maven -> Gradle (#2440)

* Moved vavr-{match, match-processor, benchmark, test} to other repositories. Removed Maven build. Added Gradle build.

* Removed openjdk13 from build matrix, keeping openjdk-ea

* Optimized Euler27Test

* Prevent manual change of src-gen/
This commit is contained in:
Daniel Dietrich 2019-07-08 00:00:45 +02:00 committed by GitHub
parent 68de9a5814
commit a45dfbfae5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
341 changed files with 1176 additions and 14586 deletions

28
.gitignore vendored
View File

@ -1,31 +1,27 @@
# -- Maven
target
*.versionsBackup
# -- Mac OS
.DS_Store
*.bak
# -- Gradle
.gradle
build
.gradle/
build/
# -- Eclipse
.classpath
.project
.settings
bin
bin/
# -- IntelliJ IDEA
.idea
.idea/
out/
*.iml
# -- Visual Studio Code
.vscode
# -- Mac OS
.DS_Store
*.log
# -- Java
hs_err_pid*
*.class
.vscode/
# -- Emacs
.#*
# -- VAVR build files
generator/bin/

View File

@ -1,16 +0,0 @@
IntelliJ IDEA
-------------
The following IntelliJ IDEA settings contained:
![Export Settings](./img/idea-settings.png)
We reformat only .java files.
![Reformat Code](./img/idea-reformat-code.png)
After the code is reformatted we have to generate sources:
```bash
mvn clean package -DskipTests
```

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

View File

@ -1,584 +0,0 @@
/* Custom Vavr style */
pre {
white-space: pre-line !important;
}
code, tt {
white-space: pre-wrap !important;
}
/* Javadoc style sheet */
/*
Overall document style
*/
@import url('resources/fonts/dejavu.css');
body {
background-color:#ffffff;
color:#353833;
font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
font-size:14px;
margin:0;
}
a:link, a:visited {
text-decoration:none;
color:#4A6782;
}
a:hover, a:focus {
text-decoration:none;
color:#bb7a2a;
}
a:active {
text-decoration:none;
color:#4A6782;
}
a[name] {
color:#353833;
}
a[name]:hover {
text-decoration:none;
color:#353833;
}
pre {
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
}
h1 {
font-size:20px;
}
h2 {
font-size:18px;
}
h3 {
font-size:16px;
font-style:italic;
}
h4 {
font-size:13px;
}
h5 {
font-size:12px;
}
h6 {
font-size:11px;
}
ul {
list-style-type:disc;
}
code, tt {
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
padding-top:4px;
margin-top:8px;
line-height:1.4em;
}
dt code {
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
padding-top:4px;
}
table tr td dt code {
font-family:'DejaVu Sans Mono', monospace;
font-size:14px;
vertical-align:top;
padding-top:4px;
}
sup {
font-size:8px;
}
/*
Document title and Copyright styles
*/
.clear {
clear:both;
height:0px;
overflow:hidden;
}
.aboutLanguage {
float:right;
padding:0px 21px;
font-size:11px;
z-index:200;
margin-top:-9px;
}
.legalCopy {
margin-left:.5em;
}
.bar a, .bar a:link, .bar a:visited, .bar a:active {
color:#FFFFFF;
text-decoration:none;
}
.bar a:hover, .bar a:focus {
color:#bb7a2a;
}
.tab {
background-color:#0066FF;
color:#ffffff;
padding:8px;
width:5em;
font-weight:bold;
}
/*
Navigation bar styles
*/
.bar {
background-color:#4D7A97;
color:#FFFFFF;
padding:.8em .5em .4em .8em;
height:auto;/*height:1.8em;*/
font-size:11px;
margin:0;
}
.topNav {
background-color:#4D7A97;
color:#FFFFFF;
float:left;
padding:0;
width:100%;
clear:right;
height:2.8em;
padding-top:10px;
overflow:hidden;
font-size:12px;
}
.bottomNav {
margin-top:10px;
background-color:#4D7A97;
color:#FFFFFF;
float:left;
padding:0;
width:100%;
clear:right;
height:2.8em;
padding-top:10px;
overflow:hidden;
font-size:12px;
}
.subNav {
background-color:#dee3e9;
float:left;
width:100%;
overflow:hidden;
font-size:12px;
}
.subNav div {
clear:left;
float:left;
padding:0 0 5px 6px;
text-transform:uppercase;
}
ul.navList, ul.subNavList {
float:left;
margin:0 25px 0 0;
padding:0;
}
ul.navList li{
list-style:none;
float:left;
padding: 5px 6px;
text-transform:uppercase;
}
ul.subNavList li{
list-style:none;
float:left;
}
.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
color:#FFFFFF;
text-decoration:none;
text-transform:uppercase;
}
.topNav a:hover, .bottomNav a:hover {
text-decoration:none;
color:#bb7a2a;
text-transform:uppercase;
}
.navBarCell1Rev {
background-color:#F8981D;
color:#253441;
margin: auto 5px;
}
.skipNav {
position:absolute;
top:auto;
left:-9999px;
overflow:hidden;
}
/*
Page header and footer styles
*/
.header, .footer {
clear:both;
margin:0 20px;
padding:5px 0 0 0;
}
.indexHeader {
margin:10px;
position:relative;
}
.indexHeader span{
margin-right:15px;
}
.indexHeader h1 {
font-size:13px;
}
.title {
color:#2c4557;
margin:10px 0;
}
.subTitle {
margin:5px 0 0 0;
}
.header ul {
margin:0 0 15px 0;
padding:0;
}
.footer ul {
margin:20px 0 5px 0;
}
.header ul li, .footer ul li {
list-style:none;
font-size:13px;
}
/*
Heading styles
*/
div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
background-color:#dee3e9;
border:1px solid #d0d9e0;
margin:0 0 6px -8px;
padding:7px 5px;
}
ul.blockList ul.blockList ul.blockList li.blockList h3 {
background-color:#dee3e9;
border:1px solid #d0d9e0;
margin:0 0 6px -8px;
padding:7px 5px;
}
ul.blockList ul.blockList li.blockList h3 {
padding:0;
margin:15px 0;
}
ul.blockList li.blockList h2 {
padding:0px 0 20px 0;
}
/*
Page layout container styles
*/
.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
clear:both;
padding:10px 20px;
position:relative;
}
.indexContainer {
margin:10px;
position:relative;
font-size:12px;
}
.indexContainer h2 {
font-size:13px;
padding:0 0 3px 0;
}
.indexContainer ul {
margin:0;
padding:0;
}
.indexContainer ul li {
list-style:none;
padding-top:2px;
}
.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
font-size:12px;
font-weight:bold;
margin:10px 0 0 0;
color:#4E4E4E;
}
.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
margin:5px 0 10px 0px;
font-size:14px;
font-family:'DejaVu Sans Mono',monospace;
}
.serializedFormContainer dl.nameValue dt {
margin-left:1px;
font-size:1.1em;
display:inline;
font-weight:bold;
}
.serializedFormContainer dl.nameValue dd {
margin:0 0 0 1px;
font-size:1.1em;
display:inline;
}
/*
List styles
*/
ul.horizontal li {
display:inline;
font-size:0.9em;
}
ul.inheritance {
margin:0;
padding:0;
}
ul.inheritance li {
display:inline;
list-style:none;
}
ul.inheritance li ul.inheritance {
margin-left:15px;
padding-left:15px;
padding-top:1px;
}
ul.blockList, ul.blockListLast {
margin:10px 0 10px 0;
padding:0;
}
ul.blockList li.blockList, ul.blockListLast li.blockList {
list-style:none;
margin-bottom:15px;
line-height:1.4;
}
ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
padding:0px 20px 5px 10px;
border:1px solid #ededed;
background-color:#f8f8f8;
}
ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
padding:0 0 5px 8px;
background-color:#ffffff;
border:none;
}
ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
margin-left:0;
padding-left:0;
padding-bottom:15px;
border:none;
}
ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
list-style:none;
border-bottom:none;
padding-bottom:0;
}
table tr td dl, table tr td dl dt, table tr td dl dd {
margin-top:0;
margin-bottom:1px;
}
/*
Table styles
*/
.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
width:100%;
border-left:1px solid #EEE;
border-right:1px solid #EEE;
border-bottom:1px solid #EEE;
}
.overviewSummary, .memberSummary {
padding:0px;
}
.overviewSummary caption, .memberSummary caption, .typeSummary caption,
.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
position:relative;
text-align:left;
background-repeat:no-repeat;
color:#253441;
font-weight:bold;
clear:none;
overflow:hidden;
padding:0px;
padding-top:10px;
padding-left:1px;
margin:0px;
white-space:pre;
}
.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
color:#FFFFFF;
}
.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
white-space:nowrap;
padding-top:5px;
padding-left:12px;
padding-right:12px;
padding-bottom:7px;
display:inline-block;
float:left;
background-color:#F8981D;
border: none;
height:16px;
}
.memberSummary caption span.activeTableTab span {
white-space:nowrap;
padding-top:5px;
padding-left:12px;
padding-right:12px;
margin-right:3px;
display:inline-block;
float:left;
background-color:#F8981D;
height:16px;
}
.memberSummary caption span.tableTab span {
white-space:nowrap;
padding-top:5px;
padding-left:12px;
padding-right:12px;
margin-right:3px;
display:inline-block;
float:left;
background-color:#4D7A97;
height:16px;
}
.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
padding-top:0px;
padding-left:0px;
padding-right:0px;
background-image:none;
float:none;
display:inline;
}
.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
display:none;
width:5px;
position:relative;
float:left;
background-color:#F8981D;
}
.memberSummary .activeTableTab .tabEnd {
display:none;
width:5px;
margin-right:3px;
position:relative;
float:left;
background-color:#F8981D;
}
.memberSummary .tableTab .tabEnd {
display:none;
width:5px;
margin-right:3px;
position:relative;
background-color:#4D7A97;
float:left;
}
.overviewSummary td, .memberSummary td, .typeSummary td,
.useSummary td, .constantsSummary td, .deprecatedSummary td {
text-align:left;
padding:0px 0px 12px 10px;
}
th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
vertical-align:top;
padding-right:0px;
padding-top:8px;
padding-bottom:3px;
}
th.colFirst, th.colLast, th.colOne, .constantsSummary th {
background:#dee3e9;
text-align:left;
padding:8px 3px 3px 7px;
}
td.colFirst, th.colFirst {
white-space:nowrap;
font-size:13px;
}
td.colLast, th.colLast {
font-size:13px;
}
td.colOne, th.colOne {
font-size:13px;
}
.overviewSummary td.colFirst, .overviewSummary th.colFirst,
.useSummary td.colFirst, .useSummary th.colFirst,
.overviewSummary td.colOne, .overviewSummary th.colOne,
.memberSummary td.colFirst, .memberSummary th.colFirst,
.memberSummary td.colOne, .memberSummary th.colOne,
.typeSummary td.colFirst{
width:25%;
vertical-align:top;
}
td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
font-weight:bold;
}
.tableSubHeadingColor {
background-color:#EEEEFF;
}
.altColor {
background-color:#FFFFFF;
}
.rowColor {
background-color:#EEEEEF;
}
/*
Content styles
*/
.description pre {
margin-top:0;
}
.deprecatedContent {
margin:0;
padding:10px 0;
}
.docSummary {
padding:0;
}
ul.blockList ul.blockList ul.blockList li.blockList h3 {
font-style:normal;
}
div.block {
font-size:14px;
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
}
td.colLast div {
padding-top:0px;
}
td.colLast a {
padding-bottom:3px;
}
/*
Formatting effect styles
*/
.sourceLineNo {
color:green;
padding:0 30px 0 0;
}
h1.hidden {
visibility:hidden;
overflow:hidden;
font-size:10px;
}
.block {
display:block;
margin:3px 10px 2px 0px;
color:#474747;
}
.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink,
.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel,
.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink {
font-weight:bold;
}
.deprecationComment, .emphasizedPhrase, .interfaceName {
font-style:italic;
}
div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
div.block div.block span.interfaceName {
font-style:normal;
}
div.contentContainer ul.blockList li.blockList h2{
padding-bottom:0px;
}

View File

@ -1,217 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the Google coding conventions from Google Java Style
that can be found at https://google.github.io/styleguide/javaguide.html.
Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sf.net (or in your downloaded distribution).
To completely disable a check, just comment it out or delete it from the file.
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
-->
<module name = "Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="warning"/>
<property name="fileExtensions" value="java, properties, xml"/>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="TreeWalker">
<module name="OuterTypeFilename"/>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
<property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
<property name="message" value="Avoid using corresponding octal or Unicode escape."/>
</module>
<module name="AvoidEscapedUnicodeCharacters">
<property name="allowEscapesForControlCharacters" value="true"/>
<property name="allowByTailComment" value="true"/>
<property name="allowNonPrintableEscapes" value="true"/>
</module>
<module name="LineLength">
<property name="max" value="100"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<module name="AvoidStarImport"/>
<module name="OneTopLevelClass"/>
<module name="NoLineWrap"/>
<module name="EmptyBlock">
<property name="option" value="TEXT"/>
<property name="tokens" value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module>
<module name="NeedBraces"/>
<module name="LeftCurly">
<property name="maxLineLength" value="100"/>
</module>
<module name="RightCurly"/>
<module name="RightCurly">
<property name="option" value="alone"/>
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<message key="ws.notFollowed"
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
<message key="ws.notPreceded"
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
</module>
<module name="OneStatementPerLine"/>
<module name="MultipleVariableDeclarations"/>
<module name="ArrayTypeStyle"/>
<module name="MissingSwitchDefault"/>
<module name="FallThrough"/>
<module name="UpperEll"/>
<module name="ModifierOrder"/>
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
</module>
<module name="SeparatorWrap">
<property name="tokens" value="DOT"/>
<property name="option" value="nl"/>
</module>
<module name="SeparatorWrap">
<property name="tokens" value="COMMA"/>
<property name="option" value="EOL"/>
</module>
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
<message key="name.invalidPattern"
value="Package name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="TypeName">
<message key="name.invalidPattern"
value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MemberName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
<message key="name.invalidPattern"
value="Member name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ParameterName">
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<property name="excludeScope" value="public"/>
<message key="name.invalidPattern"
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ParameterName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
<property name="scope" value="public"/>
<message key="name.invalidPattern"
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="CatchParameterName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
<message key="name.invalidPattern"
value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="LocalVariableName">
<property name="tokens" value="VARIABLE_DEF"/>
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
<property name="allowOneCharVarInForLoop" value="true"/>
<message key="name.invalidPattern"
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ClassTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Class type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MethodTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Method type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="InterfaceTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Interface type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="NoFinalizer"/>
<module name="GenericWhitespace">
<message key="ws.followed"
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
<message key="ws.preceded"
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
<message key="ws.illegalFollow"
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
<message key="ws.notPreceded"
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
</module>
<module name="Indentation">
<property name="basicOffset" value="2"/>
<property name="braceAdjustment" value="0"/>
<property name="caseIndent" value="2"/>
<property name="throwsIndent" value="4"/>
<property name="lineWrappingIndentation" value="4"/>
<property name="arrayInitIndent" value="2"/>
</module>
<module name="AbbreviationAsWordInName">
<property name="ignoreFinal" value="false"/>
<property name="allowedAbbreviationLength" value="1"/>
</module>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="VariableDeclarationUsageDistance"/>
<module name="CustomImportOrder">
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="separateLineBetweenGroups" value="true"/>
<property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
</module>
<module name="MethodParamPad"/>
<module name="OperatorWrap">
<property name="option" value="NL"/>
<property name="tokens" value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR, LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
</module>
<module name="AnnotationLocation">
<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
</module>
<module name="AnnotationLocation">
<property name="tokens" value="VARIABLE_DEF"/>
<property name="allowSamelineMultipleAnnotations" value="true"/>
</module>
<module name="NonEmptyAtclauseDescription"/>
<module name="JavadocTagContinuationIndentation"/>
<module name="SummaryJavadoc">
<property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
</module>
<module name="JavadocParagraph"/>
<module name="AtclauseOrder">
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="minLineCount" value="2"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
<message key="name.invalidPattern"
value="Method name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
</module>
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected"/>
</module>
<module name="CommentsIndentation"/>
</module>
</module>

View File

@ -3,7 +3,12 @@ language: java
sudo: false
dist: trusty
install: echo "Don't let Travis CI execute './gradlew assemble' by default"
install: echo "Disabled Travis CI 'install' stage by default"
env:
global:
- secure: GwuNkNkV6QUnThmV+ZsiPuR+M50sVN+7qT+Ca9qRiXAhbUJpV0kcQz+NSV/gDE9UmsdzKfPzsSaKPjtIbKN9gFzFsOCd99TXGD1n3Kkya//Pw1ziDOtZFI9EMjO/8qPIEIR+Cfk7niqpyET/ypC7aklxv8raiCVrPDXJ8TJWsYM=
- secure: i+gbt9z+eCnGV1TadNWPrkOgxmeTYUvfkQYOvVQ01cqkTeNL5YKoWx3cpoidEvx4Bj00XkNqXXvMEBViEgnVlA4Xqm8n/05WcVr6uJ/HFq1hkBTiVl5LJEvXH4NBVoEZJTY4h9B7ulMHqvhM9U/vTBYbjK+L+9OC6B+U/IJe2Ho=
matrix:
include:
@ -12,35 +17,25 @@ matrix:
- jdk: openjdk10
- jdk: openjdk11
- jdk: openjdk12
env: DEPLOY=true
- jdk: openjdk-ea
allow_failures:
- jdk: openjdk-ea
env:
global:
- secure: HU0QOLEDkYHcjX+PkicGGQ5g2L1/19V2fH13OSn82DOFlIiWmCfhSI8EG/QoWwPDp/HYQ4DH5Lo+ZEhVz5tgEultItyJ38LZJl/YYOzSAiRvTezmDdz+Cdg6SXAwCvgFCTagEJ1ChL5NyenDGDlwPB/drN0HlNNU6igPqNkM8l0=
- secure: VByzrX+inH3Z2nq50Hkj1FJnyOjPdsdIo/RUcl6DxUjkYfXP0n3tkPZGFA0PwiDpEwvRcSGLMR7mJ59Bhja5wgqXNhMqV4F0kB2PEFHSC3UmkyMnTSmDBKvP2aT6JLq00K3mYeNV5HiaYV4S7UVNdzZwaPCgc2aVZN8hF4f5/V8=
- secure: GWvKpGPBF1b/2tkYzJ/IwKpGd3kjfYpadIFoQOdQS3r6iZkutZ9FhW6vINIRsgcIRHTVha0BywG7m5sJIYo/jmsDbXc2VJFO7EcXkK6k96VZYb0pHjbXqeP/u9/ZfSzeQ4w3qNYUiXztmmrLjbCzG2gV4D2CqOaug2o81mVj4LI=
- secure: m91QxOLHBRnJzRyphCivL79i90pE/FO4yg8qTOaDuyTqVXBKnHmdARFOxSMZN9Qn3B3e28xxPaazIsJGCuPXiQKSObqzPLeFHUOa3atUJSckEUW623l1313A9iMFOYbqSBAHFHmiuuAJBwN/E2OnG3BcLZV1FRibW6J1qLRLdJw=
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- "$HOME/.m2/repository"
- "$HOME/apache-maven-3.5.4"
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
before_install:
- unset _JAVA_OPTIONS
- export M2_HOME=$HOME/apache-maven-3.5.4
- if [ ! -d $M2_HOME/bin ]; then curl https://archive.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz | tar zxf - -C $HOME; fi
- export PATH=$M2_HOME/bin:$PATH
before_install: unset _JAVA_OPTIONS
script: .travis/run-tests.sh
script:
- ./gradlew check
- if [ -n "$(git status -su src-gen)" ]; then exit 1; fi
after_success:
- bash <(curl -s https://codecov.io/bash)
- python <(curl -s https://raw.githubusercontent.com/TouK/sputnik-ci/master/sputnik-ci.py)
- mvn clean deploy -DskipTests --settings .travis/maven-settings.xml
- .travis/trigger-build.sh vavr-gwt
- .travis/trigger-build.sh vavr-jackson
- .travis/trigger-build.sh vavr-gson
- .travis/trigger-build.sh vavr-kotlin
- bash <(curl -s https://codecov.io/bash)
- if [[ -n $DEPLOY ]]; then ./gradlew uploadArchives; fi

View File

@ -1,21 +0,0 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${env.SONATYPE_USER}</username>
<password>${env.SONATYPE_PASS}</password>
</server>
</servers>
<mirrors/>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>

View File

@ -1,12 +0,0 @@
#!/bin/bash
set -ev
mvn test -B
# Break CI build on PRs where committed differ from generated sources
if [ -n "$(git status -su vavr/src-gen)" ]; then
exit 1
fi
if [ -n "$(git status -su vavr-test/src-gen)" ]; then
exit 1
fi

View File

@ -1,34 +0,0 @@
#!/bin/bash
org="vavr-io"
repo=$1
branch=$2
if [ -z $repo ]; then
echo "Usage: trigger-build.sh <github-repo> [<branch>]"
else
if [ -z $branch ]; then
branch="master"
fi
echo "Triggering travis-ci build of $org/$repo [$branch]..."
body=`cat <<EOF
{ "request": {
"branch": "$branch"
}}
EOF
`
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Travis-API-Version: 3" \
-H "Authorization: token $TRAVIS_ACCESS_TOKEN" \
-d "$body" \
https://api.travis-ci.org/repo/$org%2F$repo/requests
fi

190
build.gradle Normal file
View File

@ -0,0 +1,190 @@
/*
* Some Gradle tasks we use:
*
* - Build: `./gradlew check`
* | test reports: ./build/reports/tests/test/index.html
* | coverage reports: ./build/reports/jacoco/test/html/index.html
*
* - Javadoc (linting): `./gradlew javadoc`
*
* - Release: `./gradlew release --info`
*/
plugins {
id "net.researchgate.release" version "2.8.1"
}
apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'maven'
apply plugin: 'signing'
ext.ammoniteScalaVersion = '2.12' // Currently, generator/Generator.sc does not build with Scala 2.13
ext.ammoniteVersion = '1.6.9'
ext.assertjVersion = '3.11.1'
ext.junitVersion = '4.13-beta-3'
repositories {
mavenLocal()
mavenCentral()
}
allprojects {
group = 'io.vavr'
version = '1.0.0-SNAPSHOT'
}
sourceSets {
main {
java {
srcDirs = ['src/main/java', 'src-gen/main/java']
}
}
test {
java {
srcDirs = ['src/test/java', 'src-gen/test/java']
}
}
}
task generateSources() {
delete 'src-gen'
def targetDir = file("generator/bin")
if (!targetDir.exists()) {
targetDir.mkdirs()
}
def targetFile = new File(targetDir, "amm-${ammoniteScalaVersion}-${ammoniteVersion}.jar")
if (!targetFile.exists()) {
def sourceUrl = "https://github.com/lihaoyi/Ammonite/releases/download/${ammoniteVersion}/${ammoniteScalaVersion}-${ammoniteVersion}"
ant.get(src: sourceUrl, dest: targetFile)
}
javaexec {
main = "-jar"
args = [targetFile, "generator/Generator.sc"]
}
}
compileJava {
dependsOn 'generateSources'
sourceCompatibility = 8
targetCompatibility = 8
options.encoding = 'UTF-8'
options.compilerArgs = [ '-Xlint:all', '-Werror' ]
}
dependencies {
testCompile "junit:junit:$junitVersion"
testCompile "org.assertj:assertj-core:$assertjVersion"
}
jacocoTestReport {
reports {
xml.enabled = true
}
}
check.dependsOn jacocoTestReport
jar {
manifest {
attributes('Automatic-Module-Name': 'io.vavr')
}
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
task testSourcesJar(type: Jar) {
from sourceSets.test.allSource
classifier = 'test-sources'
}
task javadocJar(type: Jar) {
from javadoc
classifier = 'javadoc'
}
artifacts {
archives javadocJar, sourcesJar, testSourcesJar
}
// Requirements:
//
// - Get public key ID `gpg --list-keys --keyid-format SHORT`
// - Export key `gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg`
// - Add the following properties to ~/.gradle/gradle.properties
// signing.keyId=0ABCDEF
// signing.password=password
// signing.secretKeyRingFile=/absolute/path/to/.gnupg/secring.gpg
//
signing {
required { !version.endsWith("-SNAPSHOT") }
sign configurations.archives
}
// Requirements:
//
// - Add the following properties to ~/.gradle/gradle.properties
// ossrhUsername=<username>
// ossrhPassword=<password>
//
uploadArchives {
repositories {
mavenDeployer {
def sonatypeUser = project.hasProperty('ossrhUsername') ? ossrhUsername : ''
def sonatypePass = project.hasProperty('ossrhPassword') ? ossrhPassword : ''
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: sonatypeUser, password: sonatypePass)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: sonatypeUser, password: sonatypePass)
}
// Generate Sonatype conform .pom for Bintray Maven-sync, see https://central.sonatype.org/pages/requirements.html
pom.project {
name = project.name
description = "Vavr is an object-functional library for Java 8+"
url = 'https://www.vavr.io'
inceptionYear '2014'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'Daniel Dietrich'
email = 'cafebab3@gmail.com'
organization = 'Vavr'
organizationUrl = 'https://github.com/vavr-io'
}
}
scm {
connection = 'scm:git:https://github.com/vavr-io/vavr.git'
developerConnection = 'scm:git:https://github.com/vavr-io/vavr.git'
url = 'https://github.com/vavr-io/vavr/tree/master'
}
}
}
}
}
release {
buildTasks = ['build']
tagTemplate = '$name-$version'
git {
requireBranch = ''
pushToRemote = 'origin'
pushToCurrentBranch = true
}
}
afterReleaseBuild.dependsOn uploadArchives

View File

@ -17,8 +17,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// temporarily needed to circumvent https://issues.scala-lang.org/browse/SI-3772 (see case class Generics)
import Generator._
import JavaGenerator._
@ -27,17 +25,16 @@ import scala.language.implicitConversions
val N = 8
val VARARGS = 10
val TARGET_MAIN = s"${project.getBasedir()}/src-gen/main/java"
val TARGET_TEST = s"${project.getBasedir()}/src-gen/test/java"
val TARGET_MAIN = s"src-gen/main/java"
val TARGET_TEST = s"src-gen/test/java"
val CHARSET = java.nio.charset.StandardCharsets.UTF_8
/**
* ENTRY POINT
*/
def run(): Unit = {
generateMainClasses()
generateTestClasses()
}
println("Starting code generator...")
generateMainClasses()
generateTestClasses()
/**
* Generate Vavr src-gen/main/java classes
@ -780,7 +777,8 @@ def generateMainClasses(): Unit = {
/$javadoc
* Creates a {@code For}-comprehension of ${i.numerus(mtype)}.
${(0 to i).gen(j => if (j == 0) "*" else s"* @param ts$j the ${j.ordinal} $mtype")("\n")}
${(1 to i).gen(j => s"* @param <T$j> component type of the ${j.ordinal} $mtype")("\n")}
${(mtype == "Either").gen("@param <L> left component type of the given Either types")}
${(1 to i).gen(j => s"* @param <T$j> right component type of the ${j.ordinal} $mtype")("\n")}
* @return a new {@code For}-comprehension of arity $i
*/
public static <${if(mtype == "Either") "L, " else ""}$generics> $forClassName<${if(mtype == "Either") "L, " else ""}$generics> For($params) {
@ -3492,7 +3490,7 @@ def generateTestClasses(): Unit = {
def genTupleTests(): Unit = {
def genArgsForComparing(digits: Int, p: Int): String = {
(1 to digits).gen(i => if(i == p) "1" else "0")(", ")
(1 to digits).gen(i => s"${if (i == p) "1" else "0"}")(", ")
}
(0 to N).foreach(i => {
@ -3626,9 +3624,9 @@ def generateTestClasses(): Unit = {
""")}
${(i > 1) gen (1 to i).gen(j => {
val substitutedResultTypes = if (i == 0) "" else s"<${(1 to i).gen(k => if (k == j) "String" else "Integer")(", ")}>"
val substitutedResultTypes = if (i == 0) "" else s"<${(1 to i).gen(k => s"${if (k == j) "String" else "Integer"}")(", ")}>"
val ones = (1 to i).gen(_ => "1")(", ")
val result = (1 to i).gen(k => if (k == j) "\"X\"" else "1")(", ")
val result = (1 to i).gen(k => s"${if (k == j) "\"X\"" else "1"}")(", ")
xs"""
@$test
public void shouldMap${j.ordinal}Component() {
@ -3797,10 +3795,10 @@ object JavaGenerator {
*/
class ImportManager(packageNameOfClass: String, knownSimpleClassNames: List[String], wildcardThreshold: Int = 5) {
import scala.collection.mutable
// import scala.collection.mutable
val nonStaticImports = new mutable.HashMap[String, String]
val staticImports = new mutable.HashMap[String, String]
val nonStaticImports = new collection.mutable.HashMap[String, String]
val staticImports = new collection.mutable.HashMap[String, String]
def getType(fullQualifiedName: String): String = simplify(fullQualifiedName, nonStaticImports)
@ -3820,7 +3818,7 @@ object JavaGenerator {
Seq(staticImportSection, nonStaticImportSection).mkString("\n\n")
}
private def simplify(fullQualifiedName: String, imports: mutable.HashMap[String, String]): String = {
private def simplify(fullQualifiedName: String, imports: collection.mutable.HashMap[String, String]): String = {
val simpleName = getSimpleName(fullQualifiedName)
val packageName = getPackageName(fullQualifiedName)
if (packageName.isEmpty && !packageNameOfClass.isEmpty) {
@ -4080,7 +4078,7 @@ object Generator {
* @param sc Current StringContext
* @see <a href="https://gist.github.com/danieldietrich/5174348">this gist</a>
*/
implicit class StringContextExtensions(sc: StringContext) {
implicit class StringContextExtensions(private val sc: StringContext) extends AnyVal {
import scala.util.Properties.lineSeparator
@ -4104,7 +4102,7 @@ object Generator {
* Indenting a rich string, removing first and last newline.
* A rich string consists of arguments surrounded by text parts.
*/
private def align(interpolator: Seq[Any] => String, args: Seq[Any]): String = {
private def align(interpolator: Seq[Any] => String, args: collection.Seq[Any]): String = {
// indent embedded strings, invariant: parts.length = args.length + 1
val indentedArgs = for {

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

172
gradlew vendored Executable file
View File

@ -0,0 +1,172 @@
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"

84
gradlew.bat vendored Normal file
View File

@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

511
pom.xml
View File

@ -1,511 +0,0 @@
<!--
Before creating a pull request, the following goals should be executed locally:
* Executing tests: `mvn clean test`
* Executing doclint: `mvn javadoc:javadoc`
Tests & Code coverage:
* Executing benchmark assertions: `mvn clean test -Pbenchmark`
* Executing benchmarks (long running!): `mvn test -Pbenchmark -pl vavr-benchmark`
* Executing code coverage report: `mvn -P ci clean test jacoco:report`
We use these goals frequently to keep the dependencies and plugins up-to-date:
* Update version properties: `mvn versions:update-properties`
* Check for new plugin version: `mvn versions:display-plugin-updates`
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>9</version>
</parent>
<groupId>io.vavr</groupId>
<artifactId>vavr-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Vavr Parent</name>
<description>Vavr (formerly called Javaslang) is an object-functional language extension to Java 8+.</description>
<modules>
<module>vavr</module>
<module>vavr-benchmark</module>
<module>vavr-match</module>
<module>vavr-match-processor</module>
<module>vavr-test</module>
</modules>
<url>http://vavr.io</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>scm:git:git@github.com:vavr-io/vavr.git</connection>
<developerConnection>scm:git:git@github.com:vavr-io/vavr.git</developerConnection>
<url>git@github.com:vavr-io/vavr.git</url>
<tag>HEAD</tag>
</scm>
<developers>
<developer>
<id>danieldietrich</id>
<name>Daniel Dietrich</name>
<email>cafebab3@gmail.com</email>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<assertj.core.version>3.11.1</assertj.core.version>
<eclipse.lifecycle.mapping.version>1.0.0</eclipse.lifecycle.mapping.version>
<java.version>1.8</java.version>
<jmh.version>1.21</jmh.version>
<junit.version>4.13-beta-1</junit.version>
<maven.enforcer.version>3.0.0-M2</maven.enforcer.version>
<maven.build-helper.version>3.0.0</maven.build-helper.version>
<maven.bundle.version>4.1.0</maven.bundle.version>
<maven.clean.version>3.1.0</maven.clean.version>
<maven.install.version>3.0.0-M1</maven.install.version>
<maven.compiler.version>3.8.0</maven.compiler.version>
<maven.deploy.version>3.0.0-M1</maven.deploy.version>
<maven.gpg.version>1.6</maven.gpg.version>
<maven.jacoco.version>0.8.2</maven.jacoco.version>
<maven.jar.version>3.1.1</maven.jar.version>
<maven.javadoc.version>3.0.1</maven.javadoc.version>
<maven.release.version>2.5.3</maven.release.version>
<maven.versions.version>2.7</maven.versions.version>
<maven.surefire.version>3.0.0-M3</maven.surefire.version>
<maven.source.version>3.0.1</maven.source.version>
<maven.exec.version>1.5.0</maven.exec.version>
<scala.maven.version>3.4.4</scala.maven.version>
<scala.version>2.12.6</scala.version>
<scala.compat.version>2.12</scala.compat.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.core.version}</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>${jmh.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven.enforcer.version}</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.5.3</version>
<message>Minimum required Maven version to build vavr is 3.5.3</message>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${maven.versions.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${maven.install.version}</version>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>prepare-package</phase>
<goals>
<goal>jar-no-fork</goal>
<goal>test-jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven.clean.version}</version>
<executions>
<execution>
<id>clean-generated-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}/src-gen</directory>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala.maven.version}</version>
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
<scalaCompatVersion>${scala.compat.version}</scalaCompatVersion>
<failOnMultipleScalaVersions>true</failOnMultipleScalaVersions>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>script</goal>
</goals>
<configuration>
<includeScopes>plugin</includeScopes>
<scriptFile>${project.basedir}/generator/Generator.scala</scriptFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven.release.version}</version>
<configuration>
<!-- Simple tag names -->
<tagNameFormat>v@{project.version}</tagNameFormat>
<!-- Circumvent maven-gpg-plugin bug -->
<mavenExecutorId>forked-path</mavenExecutorId>
<useReleaseProfile>false</useReleaseProfile>
<!-- Honor arguments passed via command line -->
<arguments>${arguments} -Psonatype-oss-release</arguments>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>${maven.build-helper.version}</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src-gen/main/java</source>
<source>${project.build.directory}/generated-sources/annotations</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src-gen/test/java</source>
<source>${project.build.directory}/generated-test-sources/test-annotations</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-Werror</arg>
<arg>-Xlint:all</arg>
<!-- Workaround for JDK bug https://bugs.openjdk.java.net/browse/JDK-6999068 -->
<arg>-Xlint:-processing</arg>
<!-- Enable Java 9 compilation with 1.8 compatibility -->
<arg>-Xlint:-options</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven.deploy.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.version}</version>
<configuration>
<skipIfEmpty>true</skipIfEmpty>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven.javadoc.version}</version>
<configuration>
<links>
<link>https://docs.oracle.com/javase/8/docs/api/</link>
</links>
<stylesheetfile>${basedir}/../.javadoc/stylesheet.css</stylesheetfile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven.bundle.version}</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<!-- ForkJoinPool parallelism for io.vavr.concurrent.Future.
Typically this is the number of cores by default.
In the travis-ci build env this is currently set to 1. -->
<!--<argLine>-Djava.util.concurrent.ForkJoinPool.common.parallelism=1</argLine>-->
<parallel>all</parallel>
<threadCount>4</threadCount>
<reuseForks>true</reuseForks>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<!-- A profile for code coverage analysis in ci environments -->
<profile>
<id>ci</id>
<activation>
<property>
<name>env.CI</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${maven.jacoco.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- A profile for gpg-signing .jars when releasing -->
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<!-- Automatically set to true on mvn release:perform -->
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven.gpg.version}</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- A profile for eliminating eclipse m2e warnings -->
<profile>
<id>eclipse-m2e</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>${eclipse.lifecycle.mapping.version}</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<!-- Elimate the eclipse warning 'maven-enforcer-plugin (goal "enforce")
is ignored by m2e' -->
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<versionRange>[0,)</versionRange>
<goals>
<goal>enforce</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<versionRange>[0,)</versionRange>
<goals>
<goal>clean</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<versionRange>[0,)</versionRange>
<goals>
<goal>script</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<versionRange>[0,)</versionRange>
<goals>
<goal>manifest</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<!-- A profile for running the benchmarks -->
<profile>
<id>benchmark</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven.exec.version}</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<classpathScope>test</classpathScope>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath />
<argument>io.vavr.JmhRunner</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<!-- Fixes "Unable to acquire the JMH lock" error -->
<parallel>none</parallel>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
</project>

1
settings.gradle Normal file
View File

@ -0,0 +1 @@
rootProject.name = 'vavr'

View File

@ -2343,7 +2343,8 @@ public final class API {
* Creates a {@code For}-comprehension of one Iterable.
*
* @param ts1 the 1st Iterable
* @param <T1> component type of the 1st Iterable
* @param <T1> right component type of the 1st Iterable
* @return a new {@code For}-comprehension of arity 1
*/
public static <T1> For1<T1> For(Iterable<T1> ts1) {
@ -2356,8 +2357,9 @@ public final class API {
*
* @param ts1 the 1st Iterable
* @param ts2 the 2nd Iterable
* @param <T1> component type of the 1st Iterable
* @param <T2> component type of the 2nd Iterable
* @param <T1> right component type of the 1st Iterable
* @param <T2> right component type of the 2nd Iterable
* @return a new {@code For}-comprehension of arity 2
*/
public static <T1, T2> For2<T1, T2> For(Iterable<T1> ts1, Iterable<T2> ts2) {
@ -2372,9 +2374,10 @@ public final class API {
* @param ts1 the 1st Iterable
* @param ts2 the 2nd Iterable
* @param ts3 the 3rd Iterable
* @param <T1> component type of the 1st Iterable
* @param <T2> component type of the 2nd Iterable
* @param <T3> component type of the 3rd Iterable
* @param <T1> right component type of the 1st Iterable
* @param <T2> right component type of the 2nd Iterable
* @param <T3> right component type of the 3rd Iterable
* @return a new {@code For}-comprehension of arity 3
*/
public static <T1, T2, T3> For3<T1, T2, T3> For(Iterable<T1> ts1, Iterable<T2> ts2, Iterable<T3> ts3) {
@ -2391,10 +2394,11 @@ public final class API {
* @param ts2 the 2nd Iterable
* @param ts3 the 3rd Iterable
* @param ts4 the 4th Iterable
* @param <T1> component type of the 1st Iterable
* @param <T2> component type of the 2nd Iterable
* @param <T3> component type of the 3rd Iterable
* @param <T4> component type of the 4th Iterable
* @param <T1> right component type of the 1st Iterable
* @param <T2> right component type of the 2nd Iterable
* @param <T3> right component type of the 3rd Iterable
* @param <T4> right component type of the 4th Iterable
* @return a new {@code For}-comprehension of arity 4
*/
public static <T1, T2, T3, T4> For4<T1, T2, T3, T4> For(Iterable<T1> ts1, Iterable<T2> ts2, Iterable<T3> ts3, Iterable<T4> ts4) {
@ -2413,11 +2417,12 @@ public final class API {
* @param ts3 the 3rd Iterable
* @param ts4 the 4th Iterable
* @param ts5 the 5th Iterable
* @param <T1> component type of the 1st Iterable
* @param <T2> component type of the 2nd Iterable
* @param <T3> component type of the 3rd Iterable
* @param <T4> component type of the 4th Iterable
* @param <T5> component type of the 5th Iterable
* @param <T1> right component type of the 1st Iterable
* @param <T2> right component type of the 2nd Iterable
* @param <T3> right component type of the 3rd Iterable
* @param <T4> right component type of the 4th Iterable
* @param <T5> right component type of the 5th Iterable
* @return a new {@code For}-comprehension of arity 5
*/
public static <T1, T2, T3, T4, T5> For5<T1, T2, T3, T4, T5> For(Iterable<T1> ts1, Iterable<T2> ts2, Iterable<T3> ts3, Iterable<T4> ts4, Iterable<T5> ts5) {
@ -2438,12 +2443,13 @@ public final class API {
* @param ts4 the 4th Iterable
* @param ts5 the 5th Iterable
* @param ts6 the 6th Iterable
* @param <T1> component type of the 1st Iterable
* @param <T2> component type of the 2nd Iterable
* @param <T3> component type of the 3rd Iterable
* @param <T4> component type of the 4th Iterable
* @param <T5> component type of the 5th Iterable
* @param <T6> component type of the 6th Iterable
* @param <T1> right component type of the 1st Iterable
* @param <T2> right component type of the 2nd Iterable
* @param <T3> right component type of the 3rd Iterable
* @param <T4> right component type of the 4th Iterable
* @param <T5> right component type of the 5th Iterable
* @param <T6> right component type of the 6th Iterable
* @return a new {@code For}-comprehension of arity 6
*/
public static <T1, T2, T3, T4, T5, T6> For6<T1, T2, T3, T4, T5, T6> For(Iterable<T1> ts1, Iterable<T2> ts2, Iterable<T3> ts3, Iterable<T4> ts4, Iterable<T5> ts5, Iterable<T6> ts6) {
@ -2466,13 +2472,14 @@ public final class API {
* @param ts5 the 5th Iterable
* @param ts6 the 6th Iterable
* @param ts7 the 7th Iterable
* @param <T1> component type of the 1st Iterable
* @param <T2> component type of the 2nd Iterable
* @param <T3> component type of the 3rd Iterable
* @param <T4> component type of the 4th Iterable
* @param <T5> component type of the 5th Iterable
* @param <T6> component type of the 6th Iterable
* @param <T7> component type of the 7th Iterable
* @param <T1> right component type of the 1st Iterable
* @param <T2> right component type of the 2nd Iterable
* @param <T3> right component type of the 3rd Iterable
* @param <T4> right component type of the 4th Iterable
* @param <T5> right component type of the 5th Iterable
* @param <T6> right component type of the 6th Iterable
* @param <T7> right component type of the 7th Iterable
* @return a new {@code For}-comprehension of arity 7
*/
public static <T1, T2, T3, T4, T5, T6, T7> For7<T1, T2, T3, T4, T5, T6, T7> For(Iterable<T1> ts1, Iterable<T2> ts2, Iterable<T3> ts3, Iterable<T4> ts4, Iterable<T5> ts5, Iterable<T6> ts6, Iterable<T7> ts7) {
@ -2497,14 +2504,15 @@ public final class API {
* @param ts6 the 6th Iterable
* @param ts7 the 7th Iterable
* @param ts8 the 8th Iterable
* @param <T1> component type of the 1st Iterable
* @param <T2> component type of the 2nd Iterable
* @param <T3> component type of the 3rd Iterable
* @param <T4> component type of the 4th Iterable
* @param <T5> component type of the 5th Iterable
* @param <T6> component type of the 6th Iterable
* @param <T7> component type of the 7th Iterable
* @param <T8> component type of the 8th Iterable
* @param <T1> right component type of the 1st Iterable
* @param <T2> right component type of the 2nd Iterable
* @param <T3> right component type of the 3rd Iterable
* @param <T4> right component type of the 4th Iterable
* @param <T5> right component type of the 5th Iterable
* @param <T6> right component type of the 6th Iterable
* @param <T7> right component type of the 7th Iterable
* @param <T8> right component type of the 8th Iterable
* @return a new {@code For}-comprehension of arity 8
*/
public static <T1, T2, T3, T4, T5, T6, T7, T8> For8<T1, T2, T3, T4, T5, T6, T7, T8> For(Iterable<T1> ts1, Iterable<T2> ts2, Iterable<T3> ts3, Iterable<T4> ts4, Iterable<T5> ts5, Iterable<T6> ts6, Iterable<T7> ts7, Iterable<T8> ts8) {
@ -2523,7 +2531,8 @@ public final class API {
* Creates a {@code For}-comprehension of one Option.
*
* @param ts1 the 1st Option
* @param <T1> component type of the 1st Option
* @param <T1> right component type of the 1st Option
* @return a new {@code For}-comprehension of arity 1
*/
public static <T1> For1Option<T1> For(Option<T1> ts1) {
@ -2536,8 +2545,9 @@ public final class API {
*
* @param ts1 the 1st Option
* @param ts2 the 2nd Option
* @param <T1> component type of the 1st Option
* @param <T2> component type of the 2nd Option
* @param <T1> right component type of the 1st Option
* @param <T2> right component type of the 2nd Option
* @return a new {@code For}-comprehension of arity 2
*/
public static <T1, T2> For2Option<T1, T2> For(Option<T1> ts1, Option<T2> ts2) {
@ -2552,9 +2562,10 @@ public final class API {
* @param ts1 the 1st Option
* @param ts2 the 2nd Option
* @param ts3 the 3rd Option
* @param <T1> component type of the 1st Option
* @param <T2> component type of the 2nd Option
* @param <T3> component type of the 3rd Option
* @param <T1> right component type of the 1st Option
* @param <T2> right component type of the 2nd Option
* @param <T3> right component type of the 3rd Option
* @return a new {@code For}-comprehension of arity 3
*/
public static <T1, T2, T3> For3Option<T1, T2, T3> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3) {
@ -2571,10 +2582,11 @@ public final class API {
* @param ts2 the 2nd Option
* @param ts3 the 3rd Option
* @param ts4 the 4th Option
* @param <T1> component type of the 1st Option
* @param <T2> component type of the 2nd Option
* @param <T3> component type of the 3rd Option
* @param <T4> component type of the 4th Option
* @param <T1> right component type of the 1st Option
* @param <T2> right component type of the 2nd Option
* @param <T3> right component type of the 3rd Option
* @param <T4> right component type of the 4th Option
* @return a new {@code For}-comprehension of arity 4
*/
public static <T1, T2, T3, T4> For4Option<T1, T2, T3, T4> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3, Option<T4> ts4) {
@ -2593,11 +2605,12 @@ public final class API {
* @param ts3 the 3rd Option
* @param ts4 the 4th Option
* @param ts5 the 5th Option
* @param <T1> component type of the 1st Option
* @param <T2> component type of the 2nd Option
* @param <T3> component type of the 3rd Option
* @param <T4> component type of the 4th Option
* @param <T5> component type of the 5th Option
* @param <T1> right component type of the 1st Option
* @param <T2> right component type of the 2nd Option
* @param <T3> right component type of the 3rd Option
* @param <T4> right component type of the 4th Option
* @param <T5> right component type of the 5th Option
* @return a new {@code For}-comprehension of arity 5
*/
public static <T1, T2, T3, T4, T5> For5Option<T1, T2, T3, T4, T5> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3, Option<T4> ts4, Option<T5> ts5) {
@ -2618,12 +2631,13 @@ public final class API {
* @param ts4 the 4th Option
* @param ts5 the 5th Option
* @param ts6 the 6th Option
* @param <T1> component type of the 1st Option
* @param <T2> component type of the 2nd Option
* @param <T3> component type of the 3rd Option
* @param <T4> component type of the 4th Option
* @param <T5> component type of the 5th Option
* @param <T6> component type of the 6th Option
* @param <T1> right component type of the 1st Option
* @param <T2> right component type of the 2nd Option
* @param <T3> right component type of the 3rd Option
* @param <T4> right component type of the 4th Option
* @param <T5> right component type of the 5th Option
* @param <T6> right component type of the 6th Option
* @return a new {@code For}-comprehension of arity 6
*/
public static <T1, T2, T3, T4, T5, T6> For6Option<T1, T2, T3, T4, T5, T6> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3, Option<T4> ts4, Option<T5> ts5, Option<T6> ts6) {
@ -2646,13 +2660,14 @@ public final class API {
* @param ts5 the 5th Option
* @param ts6 the 6th Option
* @param ts7 the 7th Option
* @param <T1> component type of the 1st Option
* @param <T2> component type of the 2nd Option
* @param <T3> component type of the 3rd Option
* @param <T4> component type of the 4th Option
* @param <T5> component type of the 5th Option
* @param <T6> component type of the 6th Option
* @param <T7> component type of the 7th Option
* @param <T1> right component type of the 1st Option
* @param <T2> right component type of the 2nd Option
* @param <T3> right component type of the 3rd Option
* @param <T4> right component type of the 4th Option
* @param <T5> right component type of the 5th Option
* @param <T6> right component type of the 6th Option
* @param <T7> right component type of the 7th Option
* @return a new {@code For}-comprehension of arity 7
*/
public static <T1, T2, T3, T4, T5, T6, T7> For7Option<T1, T2, T3, T4, T5, T6, T7> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3, Option<T4> ts4, Option<T5> ts5, Option<T6> ts6, Option<T7> ts7) {
@ -2677,14 +2692,15 @@ public final class API {
* @param ts6 the 6th Option
* @param ts7 the 7th Option
* @param ts8 the 8th Option
* @param <T1> component type of the 1st Option
* @param <T2> component type of the 2nd Option
* @param <T3> component type of the 3rd Option
* @param <T4> component type of the 4th Option
* @param <T5> component type of the 5th Option
* @param <T6> component type of the 6th Option
* @param <T7> component type of the 7th Option
* @param <T8> component type of the 8th Option
* @param <T1> right component type of the 1st Option
* @param <T2> right component type of the 2nd Option
* @param <T3> right component type of the 3rd Option
* @param <T4> right component type of the 4th Option
* @param <T5> right component type of the 5th Option
* @param <T6> right component type of the 6th Option
* @param <T7> right component type of the 7th Option
* @param <T8> right component type of the 8th Option
* @return a new {@code For}-comprehension of arity 8
*/
public static <T1, T2, T3, T4, T5, T6, T7, T8> For8Option<T1, T2, T3, T4, T5, T6, T7, T8> For(Option<T1> ts1, Option<T2> ts2, Option<T3> ts3, Option<T4> ts4, Option<T5> ts5, Option<T6> ts6, Option<T7> ts7, Option<T8> ts8) {
@ -2703,7 +2719,8 @@ public final class API {
* Creates a {@code For}-comprehension of one Future.
*
* @param ts1 the 1st Future
* @param <T1> component type of the 1st Future
* @param <T1> right component type of the 1st Future
* @return a new {@code For}-comprehension of arity 1
*/
public static <T1> For1Future<T1> For(Future<T1> ts1) {
@ -2716,8 +2733,9 @@ public final class API {
*
* @param ts1 the 1st Future
* @param ts2 the 2nd Future
* @param <T1> component type of the 1st Future
* @param <T2> component type of the 2nd Future
* @param <T1> right component type of the 1st Future
* @param <T2> right component type of the 2nd Future
* @return a new {@code For}-comprehension of arity 2
*/
public static <T1, T2> For2Future<T1, T2> For(Future<T1> ts1, Future<T2> ts2) {
@ -2732,9 +2750,10 @@ public final class API {
* @param ts1 the 1st Future
* @param ts2 the 2nd Future
* @param ts3 the 3rd Future
* @param <T1> component type of the 1st Future
* @param <T2> component type of the 2nd Future
* @param <T3> component type of the 3rd Future
* @param <T1> right component type of the 1st Future
* @param <T2> right component type of the 2nd Future
* @param <T3> right component type of the 3rd Future
* @return a new {@code For}-comprehension of arity 3
*/
public static <T1, T2, T3> For3Future<T1, T2, T3> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3) {
@ -2751,10 +2770,11 @@ public final class API {
* @param ts2 the 2nd Future
* @param ts3 the 3rd Future
* @param ts4 the 4th Future
* @param <T1> component type of the 1st Future
* @param <T2> component type of the 2nd Future
* @param <T3> component type of the 3rd Future
* @param <T4> component type of the 4th Future
* @param <T1> right component type of the 1st Future
* @param <T2> right component type of the 2nd Future
* @param <T3> right component type of the 3rd Future
* @param <T4> right component type of the 4th Future
* @return a new {@code For}-comprehension of arity 4
*/
public static <T1, T2, T3, T4> For4Future<T1, T2, T3, T4> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4) {
@ -2773,11 +2793,12 @@ public final class API {
* @param ts3 the 3rd Future
* @param ts4 the 4th Future
* @param ts5 the 5th Future
* @param <T1> component type of the 1st Future
* @param <T2> component type of the 2nd Future
* @param <T3> component type of the 3rd Future
* @param <T4> component type of the 4th Future
* @param <T5> component type of the 5th Future
* @param <T1> right component type of the 1st Future
* @param <T2> right component type of the 2nd Future
* @param <T3> right component type of the 3rd Future
* @param <T4> right component type of the 4th Future
* @param <T5> right component type of the 5th Future
* @return a new {@code For}-comprehension of arity 5
*/
public static <T1, T2, T3, T4, T5> For5Future<T1, T2, T3, T4, T5> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5) {
@ -2798,12 +2819,13 @@ public final class API {
* @param ts4 the 4th Future
* @param ts5 the 5th Future
* @param ts6 the 6th Future
* @param <T1> component type of the 1st Future
* @param <T2> component type of the 2nd Future
* @param <T3> component type of the 3rd Future
* @param <T4> component type of the 4th Future
* @param <T5> component type of the 5th Future
* @param <T6> component type of the 6th Future
* @param <T1> right component type of the 1st Future
* @param <T2> right component type of the 2nd Future
* @param <T3> right component type of the 3rd Future
* @param <T4> right component type of the 4th Future
* @param <T5> right component type of the 5th Future
* @param <T6> right component type of the 6th Future
* @return a new {@code For}-comprehension of arity 6
*/
public static <T1, T2, T3, T4, T5, T6> For6Future<T1, T2, T3, T4, T5, T6> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6) {
@ -2826,13 +2848,14 @@ public final class API {
* @param ts5 the 5th Future
* @param ts6 the 6th Future
* @param ts7 the 7th Future
* @param <T1> component type of the 1st Future
* @param <T2> component type of the 2nd Future
* @param <T3> component type of the 3rd Future
* @param <T4> component type of the 4th Future
* @param <T5> component type of the 5th Future
* @param <T6> component type of the 6th Future
* @param <T7> component type of the 7th Future
* @param <T1> right component type of the 1st Future
* @param <T2> right component type of the 2nd Future
* @param <T3> right component type of the 3rd Future
* @param <T4> right component type of the 4th Future
* @param <T5> right component type of the 5th Future
* @param <T6> right component type of the 6th Future
* @param <T7> right component type of the 7th Future
* @return a new {@code For}-comprehension of arity 7
*/
public static <T1, T2, T3, T4, T5, T6, T7> For7Future<T1, T2, T3, T4, T5, T6, T7> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6, Future<T7> ts7) {
@ -2857,14 +2880,15 @@ public final class API {
* @param ts6 the 6th Future
* @param ts7 the 7th Future
* @param ts8 the 8th Future
* @param <T1> component type of the 1st Future
* @param <T2> component type of the 2nd Future
* @param <T3> component type of the 3rd Future
* @param <T4> component type of the 4th Future
* @param <T5> component type of the 5th Future
* @param <T6> component type of the 6th Future
* @param <T7> component type of the 7th Future
* @param <T8> component type of the 8th Future
* @param <T1> right component type of the 1st Future
* @param <T2> right component type of the 2nd Future
* @param <T3> right component type of the 3rd Future
* @param <T4> right component type of the 4th Future
* @param <T5> right component type of the 5th Future
* @param <T6> right component type of the 6th Future
* @param <T7> right component type of the 7th Future
* @param <T8> right component type of the 8th Future
* @return a new {@code For}-comprehension of arity 8
*/
public static <T1, T2, T3, T4, T5, T6, T7, T8> For8Future<T1, T2, T3, T4, T5, T6, T7, T8> For(Future<T1> ts1, Future<T2> ts2, Future<T3> ts3, Future<T4> ts4, Future<T5> ts5, Future<T6> ts6, Future<T7> ts7, Future<T8> ts8) {
@ -2883,7 +2907,8 @@ public final class API {
* Creates a {@code For}-comprehension of one Try.
*
* @param ts1 the 1st Try
* @param <T1> component type of the 1st Try
* @param <T1> right component type of the 1st Try
* @return a new {@code For}-comprehension of arity 1
*/
public static <T1> For1Try<T1> For(Try<T1> ts1) {
@ -2896,8 +2921,9 @@ public final class API {
*
* @param ts1 the 1st Try
* @param ts2 the 2nd Try
* @param <T1> component type of the 1st Try
* @param <T2> component type of the 2nd Try
* @param <T1> right component type of the 1st Try
* @param <T2> right component type of the 2nd Try
* @return a new {@code For}-comprehension of arity 2
*/
public static <T1, T2> For2Try<T1, T2> For(Try<T1> ts1, Try<T2> ts2) {
@ -2912,9 +2938,10 @@ public final class API {
* @param ts1 the 1st Try
* @param ts2 the 2nd Try
* @param ts3 the 3rd Try
* @param <T1> component type of the 1st Try
* @param <T2> component type of the 2nd Try
* @param <T3> component type of the 3rd Try
* @param <T1> right component type of the 1st Try
* @param <T2> right component type of the 2nd Try
* @param <T3> right component type of the 3rd Try
* @return a new {@code For}-comprehension of arity 3
*/
public static <T1, T2, T3> For3Try<T1, T2, T3> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3) {
@ -2931,10 +2958,11 @@ public final class API {
* @param ts2 the 2nd Try
* @param ts3 the 3rd Try
* @param ts4 the 4th Try
* @param <T1> component type of the 1st Try
* @param <T2> component type of the 2nd Try
* @param <T3> component type of the 3rd Try
* @param <T4> component type of the 4th Try
* @param <T1> right component type of the 1st Try
* @param <T2> right component type of the 2nd Try
* @param <T3> right component type of the 3rd Try
* @param <T4> right component type of the 4th Try
* @return a new {@code For}-comprehension of arity 4
*/
public static <T1, T2, T3, T4> For4Try<T1, T2, T3, T4> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4) {
@ -2953,11 +2981,12 @@ public final class API {
* @param ts3 the 3rd Try
* @param ts4 the 4th Try
* @param ts5 the 5th Try
* @param <T1> component type of the 1st Try
* @param <T2> component type of the 2nd Try
* @param <T3> component type of the 3rd Try
* @param <T4> component type of the 4th Try
* @param <T5> component type of the 5th Try
* @param <T1> right component type of the 1st Try
* @param <T2> right component type of the 2nd Try
* @param <T3> right component type of the 3rd Try
* @param <T4> right component type of the 4th Try
* @param <T5> right component type of the 5th Try
* @return a new {@code For}-comprehension of arity 5
*/
public static <T1, T2, T3, T4, T5> For5Try<T1, T2, T3, T4, T5> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5) {
@ -2978,12 +3007,13 @@ public final class API {
* @param ts4 the 4th Try
* @param ts5 the 5th Try
* @param ts6 the 6th Try
* @param <T1> component type of the 1st Try
* @param <T2> component type of the 2nd Try
* @param <T3> component type of the 3rd Try
* @param <T4> component type of the 4th Try
* @param <T5> component type of the 5th Try
* @param <T6> component type of the 6th Try
* @param <T1> right component type of the 1st Try
* @param <T2> right component type of the 2nd Try
* @param <T3> right component type of the 3rd Try
* @param <T4> right component type of the 4th Try
* @param <T5> right component type of the 5th Try
* @param <T6> right component type of the 6th Try
* @return a new {@code For}-comprehension of arity 6
*/
public static <T1, T2, T3, T4, T5, T6> For6Try<T1, T2, T3, T4, T5, T6> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6) {
@ -3006,13 +3036,14 @@ public final class API {
* @param ts5 the 5th Try
* @param ts6 the 6th Try
* @param ts7 the 7th Try
* @param <T1> component type of the 1st Try
* @param <T2> component type of the 2nd Try
* @param <T3> component type of the 3rd Try
* @param <T4> component type of the 4th Try
* @param <T5> component type of the 5th Try
* @param <T6> component type of the 6th Try
* @param <T7> component type of the 7th Try
* @param <T1> right component type of the 1st Try
* @param <T2> right component type of the 2nd Try
* @param <T3> right component type of the 3rd Try
* @param <T4> right component type of the 4th Try
* @param <T5> right component type of the 5th Try
* @param <T6> right component type of the 6th Try
* @param <T7> right component type of the 7th Try
* @return a new {@code For}-comprehension of arity 7
*/
public static <T1, T2, T3, T4, T5, T6, T7> For7Try<T1, T2, T3, T4, T5, T6, T7> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6, Try<T7> ts7) {
@ -3037,14 +3068,15 @@ public final class API {
* @param ts6 the 6th Try
* @param ts7 the 7th Try
* @param ts8 the 8th Try
* @param <T1> component type of the 1st Try
* @param <T2> component type of the 2nd Try
* @param <T3> component type of the 3rd Try
* @param <T4> component type of the 4th Try
* @param <T5> component type of the 5th Try
* @param <T6> component type of the 6th Try
* @param <T7> component type of the 7th Try
* @param <T8> component type of the 8th Try
* @param <T1> right component type of the 1st Try
* @param <T2> right component type of the 2nd Try
* @param <T3> right component type of the 3rd Try
* @param <T4> right component type of the 4th Try
* @param <T5> right component type of the 5th Try
* @param <T6> right component type of the 6th Try
* @param <T7> right component type of the 7th Try
* @param <T8> right component type of the 8th Try
* @return a new {@code For}-comprehension of arity 8
*/
public static <T1, T2, T3, T4, T5, T6, T7, T8> For8Try<T1, T2, T3, T4, T5, T6, T7, T8> For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6, Try<T7> ts7, Try<T8> ts8) {
@ -3063,7 +3095,8 @@ public final class API {
* Creates a {@code For}-comprehension of one Either.
*
* @param ts1 the 1st Either
* @param <T1> component type of the 1st Either
@param <L> left component type of the given Either types
* @param <T1> right component type of the 1st Either
* @return a new {@code For}-comprehension of arity 1
*/
public static <L, T1> For1Either<L, T1> For(Either<L, T1> ts1) {
@ -3076,8 +3109,9 @@ public final class API {
*
* @param ts1 the 1st Either
* @param ts2 the 2nd Either
* @param <T1> component type of the 1st Either
* @param <T2> component type of the 2nd Either
@param <L> left component type of the given Either types
* @param <T1> right component type of the 1st Either
* @param <T2> right component type of the 2nd Either
* @return a new {@code For}-comprehension of arity 2
*/
public static <L, T1, T2> For2Either<L, T1, T2> For(Either<L, T1> ts1, Either<L, T2> ts2) {
@ -3092,9 +3126,10 @@ public final class API {
* @param ts1 the 1st Either
* @param ts2 the 2nd Either
* @param ts3 the 3rd Either
* @param <T1> component type of the 1st Either
* @param <T2> component type of the 2nd Either
* @param <T3> component type of the 3rd Either
@param <L> left component type of the given Either types
* @param <T1> right component type of the 1st Either
* @param <T2> right component type of the 2nd Either
* @param <T3> right component type of the 3rd Either
* @return a new {@code For}-comprehension of arity 3
*/
public static <L, T1, T2, T3> For3Either<L, T1, T2, T3> For(Either<L, T1> ts1, Either<L, T2> ts2, Either<L, T3> ts3) {
@ -3111,10 +3146,11 @@ public final class API {
* @param ts2 the 2nd Either
* @param ts3 the 3rd Either
* @param ts4 the 4th Either
* @param <T1> component type of the 1st Either
* @param <T2> component type of the 2nd Either
* @param <T3> component type of the 3rd Either
* @param <T4> component type of the 4th Either
@param <L> left component type of the given Either types
* @param <T1> right component type of the 1st Either
* @param <T2> right component type of the 2nd Either
* @param <T3> right component type of the 3rd Either
* @param <T4> right component type of the 4th Either
* @return a new {@code For}-comprehension of arity 4
*/
public static <L, T1, T2, T3, T4> For4Either<L, T1, T2, T3, T4> For(Either<L, T1> ts1, Either<L, T2> ts2, Either<L, T3> ts3, Either<L, T4> ts4) {
@ -3133,11 +3169,12 @@ public final class API {
* @param ts3 the 3rd Either
* @param ts4 the 4th Either
* @param ts5 the 5th Either
* @param <T1> component type of the 1st Either
* @param <T2> component type of the 2nd Either
* @param <T3> component type of the 3rd Either
* @param <T4> component type of the 4th Either
* @param <T5> component type of the 5th Either
@param <L> left component type of the given Either types
* @param <T1> right component type of the 1st Either
* @param <T2> right component type of the 2nd Either
* @param <T3> right component type of the 3rd Either
* @param <T4> right component type of the 4th Either
* @param <T5> right component type of the 5th Either
* @return a new {@code For}-comprehension of arity 5
*/
public static <L, T1, T2, T3, T4, T5> For5Either<L, T1, T2, T3, T4, T5> For(Either<L, T1> ts1, Either<L, T2> ts2, Either<L, T3> ts3, Either<L, T4> ts4, Either<L, T5> ts5) {
@ -3158,12 +3195,13 @@ public final class API {
* @param ts4 the 4th Either
* @param ts5 the 5th Either
* @param ts6 the 6th Either
* @param <T1> component type of the 1st Either
* @param <T2> component type of the 2nd Either
* @param <T3> component type of the 3rd Either
* @param <T4> component type of the 4th Either
* @param <T5> component type of the 5th Either
* @param <T6> component type of the 6th Either
@param <L> left component type of the given Either types
* @param <T1> right component type of the 1st Either
* @param <T2> right component type of the 2nd Either
* @param <T3> right component type of the 3rd Either
* @param <T4> right component type of the 4th Either
* @param <T5> right component type of the 5th Either
* @param <T6> right component type of the 6th Either
* @return a new {@code For}-comprehension of arity 6
*/
public static <L, T1, T2, T3, T4, T5, T6> For6Either<L, T1, T2, T3, T4, T5, T6> For(Either<L, T1> ts1, Either<L, T2> ts2, Either<L, T3> ts3, Either<L, T4> ts4, Either<L, T5> ts5, Either<L, T6> ts6) {
@ -3186,13 +3224,14 @@ public final class API {
* @param ts5 the 5th Either
* @param ts6 the 6th Either
* @param ts7 the 7th Either
* @param <T1> component type of the 1st Either
* @param <T2> component type of the 2nd Either
* @param <T3> component type of the 3rd Either
* @param <T4> component type of the 4th Either
* @param <T5> component type of the 5th Either
* @param <T6> component type of the 6th Either
* @param <T7> component type of the 7th Either
@param <L> left component type of the given Either types
* @param <T1> right component type of the 1st Either
* @param <T2> right component type of the 2nd Either
* @param <T3> right component type of the 3rd Either
* @param <T4> right component type of the 4th Either
* @param <T5> right component type of the 5th Either
* @param <T6> right component type of the 6th Either
* @param <T7> right component type of the 7th Either
* @return a new {@code For}-comprehension of arity 7
*/
public static <L, T1, T2, T3, T4, T5, T6, T7> For7Either<L, T1, T2, T3, T4, T5, T6, T7> For(Either<L, T1> ts1, Either<L, T2> ts2, Either<L, T3> ts3, Either<L, T4> ts4, Either<L, T5> ts5, Either<L, T6> ts6, Either<L, T7> ts7) {
@ -3217,14 +3256,15 @@ public final class API {
* @param ts6 the 6th Either
* @param ts7 the 7th Either
* @param ts8 the 8th Either
* @param <T1> component type of the 1st Either
* @param <T2> component type of the 2nd Either
* @param <T3> component type of the 3rd Either
* @param <T4> component type of the 4th Either
* @param <T5> component type of the 5th Either
* @param <T6> component type of the 6th Either
* @param <T7> component type of the 7th Either
* @param <T8> component type of the 8th Either
@param <L> left component type of the given Either types
* @param <T1> right component type of the 1st Either
* @param <T2> right component type of the 2nd Either
* @param <T3> right component type of the 3rd Either
* @param <T4> right component type of the 4th Either
* @param <T5> right component type of the 5th Either
* @param <T6> right component type of the 6th Either
* @param <T7> right component type of the 7th Either
* @param <T8> right component type of the 8th Either
* @return a new {@code For}-comprehension of arity 8
*/
public static <L, T1, T2, T3, T4, T5, T6, T7, T8> For8Either<L, T1, T2, T3, T4, T5, T6, T7, T8> For(Either<L, T1> ts1, Either<L, T2> ts2, Either<L, T3> ts3, Either<L, T4> ts4, Either<L, T5> ts5, Either<L, T6> ts6, Either<L, T7> ts7, Either<L, T8> ts8) {
@ -3243,7 +3283,8 @@ public final class API {
* Creates a {@code For}-comprehension of one List.
*
* @param ts1 the 1st List
* @param <T1> component type of the 1st List
* @param <T1> right component type of the 1st List
* @return a new {@code For}-comprehension of arity 1
*/
public static <T1> For1List<T1> For(List<T1> ts1) {
@ -3256,8 +3297,9 @@ public final class API {
*
* @param ts1 the 1st List
* @param ts2 the 2nd List
* @param <T1> component type of the 1st List
* @param <T2> component type of the 2nd List
* @param <T1> right component type of the 1st List
* @param <T2> right component type of the 2nd List
* @return a new {@code For}-comprehension of arity 2
*/
public static <T1, T2> For2List<T1, T2> For(List<T1> ts1, List<T2> ts2) {
@ -3272,9 +3314,10 @@ public final class API {
* @param ts1 the 1st List
* @param ts2 the 2nd List
* @param ts3 the 3rd List
* @param <T1> component type of the 1st List
* @param <T2> component type of the 2nd List
* @param <T3> component type of the 3rd List
* @param <T1> right component type of the 1st List
* @param <T2> right component type of the 2nd List
* @param <T3> right component type of the 3rd List
* @return a new {@code For}-comprehension of arity 3
*/
public static <T1, T2, T3> For3List<T1, T2, T3> For(List<T1> ts1, List<T2> ts2, List<T3> ts3) {
@ -3291,10 +3334,11 @@ public final class API {
* @param ts2 the 2nd List
* @param ts3 the 3rd List
* @param ts4 the 4th List
* @param <T1> component type of the 1st List
* @param <T2> component type of the 2nd List
* @param <T3> component type of the 3rd List
* @param <T4> component type of the 4th List
* @param <T1> right component type of the 1st List
* @param <T2> right component type of the 2nd List
* @param <T3> right component type of the 3rd List
* @param <T4> right component type of the 4th List
* @return a new {@code For}-comprehension of arity 4
*/
public static <T1, T2, T3, T4> For4List<T1, T2, T3, T4> For(List<T1> ts1, List<T2> ts2, List<T3> ts3, List<T4> ts4) {
@ -3313,11 +3357,12 @@ public final class API {
* @param ts3 the 3rd List
* @param ts4 the 4th List
* @param ts5 the 5th List
* @param <T1> component type of the 1st List
* @param <T2> component type of the 2nd List
* @param <T3> component type of the 3rd List
* @param <T4> component type of the 4th List
* @param <T5> component type of the 5th List
* @param <T1> right component type of the 1st List
* @param <T2> right component type of the 2nd List
* @param <T3> right component type of the 3rd List
* @param <T4> right component type of the 4th List
* @param <T5> right component type of the 5th List
* @return a new {@code For}-comprehension of arity 5
*/
public static <T1, T2, T3, T4, T5> For5List<T1, T2, T3, T4, T5> For(List<T1> ts1, List<T2> ts2, List<T3> ts3, List<T4> ts4, List<T5> ts5) {
@ -3338,12 +3383,13 @@ public final class API {
* @param ts4 the 4th List
* @param ts5 the 5th List
* @param ts6 the 6th List
* @param <T1> component type of the 1st List
* @param <T2> component type of the 2nd List
* @param <T3> component type of the 3rd List
* @param <T4> component type of the 4th List
* @param <T5> component type of the 5th List
* @param <T6> component type of the 6th List
* @param <T1> right component type of the 1st List
* @param <T2> right component type of the 2nd List
* @param <T3> right component type of the 3rd List
* @param <T4> right component type of the 4th List
* @param <T5> right component type of the 5th List
* @param <T6> right component type of the 6th List
* @return a new {@code For}-comprehension of arity 6
*/
public static <T1, T2, T3, T4, T5, T6> For6List<T1, T2, T3, T4, T5, T6> For(List<T1> ts1, List<T2> ts2, List<T3> ts3, List<T4> ts4, List<T5> ts5, List<T6> ts6) {
@ -3366,13 +3412,14 @@ public final class API {
* @param ts5 the 5th List
* @param ts6 the 6th List
* @param ts7 the 7th List
* @param <T1> component type of the 1st List
* @param <T2> component type of the 2nd List
* @param <T3> component type of the 3rd List
* @param <T4> component type of the 4th List
* @param <T5> component type of the 5th List
* @param <T6> component type of the 6th List
* @param <T7> component type of the 7th List
* @param <T1> right component type of the 1st List
* @param <T2> right component type of the 2nd List
* @param <T3> right component type of the 3rd List
* @param <T4> right component type of the 4th List
* @param <T5> right component type of the 5th List
* @param <T6> right component type of the 6th List
* @param <T7> right component type of the 7th List
* @return a new {@code For}-comprehension of arity 7
*/
public static <T1, T2, T3, T4, T5, T6, T7> For7List<T1, T2, T3, T4, T5, T6, T7> For(List<T1> ts1, List<T2> ts2, List<T3> ts3, List<T4> ts4, List<T5> ts5, List<T6> ts6, List<T7> ts7) {
@ -3397,14 +3444,15 @@ public final class API {
* @param ts6 the 6th List
* @param ts7 the 7th List
* @param ts8 the 8th List
* @param <T1> component type of the 1st List
* @param <T2> component type of the 2nd List
* @param <T3> component type of the 3rd List
* @param <T4> component type of the 4th List
* @param <T5> component type of the 5th List
* @param <T6> component type of the 6th List
* @param <T7> component type of the 7th List
* @param <T8> component type of the 8th List
* @param <T1> right component type of the 1st List
* @param <T2> right component type of the 2nd List
* @param <T3> right component type of the 3rd List
* @param <T4> right component type of the 4th List
* @param <T5> right component type of the 5th List
* @param <T6> right component type of the 6th List
* @param <T7> right component type of the 7th List
* @param <T8> right component type of the 8th List
* @return a new {@code For}-comprehension of arity 8
*/
public static <T1, T2, T3, T4, T5, T6, T7, T8> For8List<T1, T2, T3, T4, T5, T6, T7, T8> For(List<T1> ts1, List<T2> ts2, List<T3> ts3, List<T4> ts4, List<T5> ts5, List<T6> ts6, List<T7> ts7, List<T8> ts8) {

View File

@ -132,6 +132,7 @@ public interface CheckedFunction0<R> extends Serializable {
return (CheckedFunction0<R>) f;
}
/**
* Applies this function to no arguments and returns the result.
*
@ -140,6 +141,7 @@ public interface CheckedFunction0<R> extends Serializable {
*/
R apply() throws Throwable;
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -192,7 +194,7 @@ public interface CheckedFunction0<R> extends Serializable {
try {
return apply();
} catch (Throwable x) {
throw new RuntimeException(x);
throw new RuntimeException(x);
}
});
return (CheckedFunction0<R> & Memoized) () -> {
@ -214,6 +216,7 @@ public interface CheckedFunction0<R> extends Serializable {
return this instanceof Memoized;
}
/**
* Return a composed function that first applies this CheckedFunction0 to the given arguments and in case of throwable
* try to get value from {@code recover} function with same arguments and throwable information.
@ -264,6 +267,7 @@ public interface CheckedFunction0<R> extends Serializable {
return () -> after.apply(apply());
}
}
interface CheckedFunction0Module {

View File

@ -157,6 +157,7 @@ public interface CheckedFunction1<T1, R> extends Serializable {
*/
R apply(T1 t1) throws Throwable;
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -229,6 +230,7 @@ public interface CheckedFunction1<T1, R> extends Serializable {
return this instanceof Memoized;
}
/**
* Return a composed function that first applies this CheckedFunction1 to the given arguments and in case of throwable
* try to get value from {@code recover} function with same arguments and throwable information.

View File

@ -145,6 +145,7 @@ public interface CheckedFunction2<T1, T2, R> extends Serializable {
return (CheckedFunction2<T1, T2, R>) f;
}
/**
* Applies this function to two arguments and returns the result.
*
@ -165,6 +166,7 @@ public interface CheckedFunction2<T1, T2, R> extends Serializable {
return (T2 t2) -> apply(t1, t2);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -238,6 +240,7 @@ public interface CheckedFunction2<T1, T2, R> extends Serializable {
return this instanceof Memoized;
}
/**
* Return a composed function that first applies this CheckedFunction2 to the given arguments and in case of throwable
* try to get value from {@code recover} function with same arguments and throwable information.
@ -288,6 +291,7 @@ public interface CheckedFunction2<T1, T2, R> extends Serializable {
return (t1, t2) -> after.apply(apply(t1, t2));
}
}
interface CheckedFunction2Module {

View File

@ -150,6 +150,7 @@ public interface CheckedFunction3<T1, T2, T3, R> extends Serializable {
return (CheckedFunction3<T1, T2, T3, R>) f;
}
/**
* Applies this function to three arguments and returns the result.
*
@ -182,6 +183,7 @@ public interface CheckedFunction3<T1, T2, T3, R> extends Serializable {
return (T3 t3) -> apply(t1, t2, t3);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -255,6 +257,7 @@ public interface CheckedFunction3<T1, T2, T3, R> extends Serializable {
return this instanceof Memoized;
}
/**
* Return a composed function that first applies this CheckedFunction3 to the given arguments and in case of throwable
* try to get value from {@code recover} function with same arguments and throwable information.
@ -305,6 +308,7 @@ public interface CheckedFunction3<T1, T2, T3, R> extends Serializable {
return (t1, t2, t3) -> after.apply(apply(t1, t2, t3));
}
}
interface CheckedFunction3Module {

View File

@ -156,6 +156,7 @@ public interface CheckedFunction4<T1, T2, T3, T4, R> extends Serializable {
return (CheckedFunction4<T1, T2, T3, T4, R>) f;
}
/**
* Applies this function to 4 arguments and returns the result.
*
@ -201,6 +202,7 @@ public interface CheckedFunction4<T1, T2, T3, T4, R> extends Serializable {
return (T4 t4) -> apply(t1, t2, t3, t4);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -274,6 +276,7 @@ public interface CheckedFunction4<T1, T2, T3, T4, R> extends Serializable {
return this instanceof Memoized;
}
/**
* Return a composed function that first applies this CheckedFunction4 to the given arguments and in case of throwable
* try to get value from {@code recover} function with same arguments and throwable information.
@ -324,6 +327,7 @@ public interface CheckedFunction4<T1, T2, T3, T4, R> extends Serializable {
return (t1, t2, t3, t4) -> after.apply(apply(t1, t2, t3, t4));
}
}
interface CheckedFunction4Module {

View File

@ -162,6 +162,7 @@ public interface CheckedFunction5<T1, T2, T3, T4, T5, R> extends Serializable {
return (CheckedFunction5<T1, T2, T3, T4, T5, R>) f;
}
/**
* Applies this function to 5 arguments and returns the result.
*
@ -221,6 +222,7 @@ public interface CheckedFunction5<T1, T2, T3, T4, T5, R> extends Serializable {
return (T5 t5) -> apply(t1, t2, t3, t4, t5);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -294,6 +296,7 @@ public interface CheckedFunction5<T1, T2, T3, T4, T5, R> extends Serializable {
return this instanceof Memoized;
}
/**
* Return a composed function that first applies this CheckedFunction5 to the given arguments and in case of throwable
* try to get value from {@code recover} function with same arguments and throwable information.
@ -344,6 +347,7 @@ public interface CheckedFunction5<T1, T2, T3, T4, T5, R> extends Serializable {
return (t1, t2, t3, t4, t5) -> after.apply(apply(t1, t2, t3, t4, t5));
}
}
interface CheckedFunction5Module {

View File

@ -168,6 +168,7 @@ public interface CheckedFunction6<T1, T2, T3, T4, T5, T6, R> extends Serializabl
return (CheckedFunction6<T1, T2, T3, T4, T5, T6, R>) f;
}
/**
* Applies this function to 6 arguments and returns the result.
*
@ -242,6 +243,7 @@ public interface CheckedFunction6<T1, T2, T3, T4, T5, T6, R> extends Serializabl
return (T6 t6) -> apply(t1, t2, t3, t4, t5, t6);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -315,6 +317,7 @@ public interface CheckedFunction6<T1, T2, T3, T4, T5, T6, R> extends Serializabl
return this instanceof Memoized;
}
/**
* Return a composed function that first applies this CheckedFunction6 to the given arguments and in case of throwable
* try to get value from {@code recover} function with same arguments and throwable information.
@ -365,6 +368,7 @@ public interface CheckedFunction6<T1, T2, T3, T4, T5, T6, R> extends Serializabl
return (t1, t2, t3, t4, t5, t6) -> after.apply(apply(t1, t2, t3, t4, t5, t6));
}
}
interface CheckedFunction6Module {

View File

@ -174,6 +174,7 @@ public interface CheckedFunction7<T1, T2, T3, T4, T5, T6, T7, R> extends Seriali
return (CheckedFunction7<T1, T2, T3, T4, T5, T6, T7, R>) f;
}
/**
* Applies this function to 7 arguments and returns the result.
*
@ -264,6 +265,7 @@ public interface CheckedFunction7<T1, T2, T3, T4, T5, T6, T7, R> extends Seriali
return (T7 t7) -> apply(t1, t2, t3, t4, t5, t6, t7);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -337,6 +339,7 @@ public interface CheckedFunction7<T1, T2, T3, T4, T5, T6, T7, R> extends Seriali
return this instanceof Memoized;
}
/**
* Return a composed function that first applies this CheckedFunction7 to the given arguments and in case of throwable
* try to get value from {@code recover} function with same arguments and throwable information.
@ -387,6 +390,7 @@ public interface CheckedFunction7<T1, T2, T3, T4, T5, T6, T7, R> extends Seriali
return (t1, t2, t3, t4, t5, t6, t7) -> after.apply(apply(t1, t2, t3, t4, t5, t6, t7));
}
}
interface CheckedFunction7Module {

View File

@ -180,6 +180,7 @@ public interface CheckedFunction8<T1, T2, T3, T4, T5, T6, T7, T8, R> extends Ser
return (CheckedFunction8<T1, T2, T3, T4, T5, T6, T7, T8, R>) f;
}
/**
* Applies this function to 8 arguments and returns the result.
*
@ -287,6 +288,7 @@ public interface CheckedFunction8<T1, T2, T3, T4, T5, T6, T7, T8, R> extends Ser
return (T8 t8) -> apply(t1, t2, t3, t4, t5, t6, t7, t8);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -360,6 +362,7 @@ public interface CheckedFunction8<T1, T2, T3, T4, T5, T6, T7, T8, R> extends Ser
return this instanceof Memoized;
}
/**
* Return a composed function that first applies this CheckedFunction8 to the given arguments and in case of throwable
* try to get value from {@code recover} function with same arguments and throwable information.
@ -410,6 +413,7 @@ public interface CheckedFunction8<T1, T2, T3, T4, T5, T6, T7, T8, R> extends Ser
return (t1, t2, t3, t4, t5, t6, t7, t8) -> after.apply(apply(t1, t2, t3, t4, t5, t6, t7, t8));
}
}
interface CheckedFunction8Module {

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.control.Option;
import io.vavr.control.Try;
import java.io.Serializable;
@ -130,6 +132,7 @@ public interface Function0<R> extends Serializable, Supplier<R> {
return (Function0<R>) f;
}
/**
* Applies this function to no arguments and returns the result.
*
@ -138,6 +141,7 @@ public interface Function0<R> extends Serializable, Supplier<R> {
*/
R apply();
/**
* Implementation of {@linkplain java.util.function.Supplier#get()}, just calls {@linkplain #apply()}.
*
@ -209,6 +213,7 @@ public interface Function0<R> extends Serializable, Supplier<R> {
return this instanceof Memoized;
}
/**
* Returns a composed function that first applies this Function0 to the given argument and then applies
* {@linkplain Function} {@code after} to the result.
@ -223,4 +228,5 @@ public interface Function0<R> extends Serializable, Supplier<R> {
return () -> after.apply(apply());
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.control.Option;
import io.vavr.control.Try;
import java.io.Serializable;
@ -156,6 +158,7 @@ public interface Function1<T1, R> extends Serializable, Function<T1, R> {
*/
R apply(T1 t1);
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -254,6 +257,7 @@ public interface Function1<T1, R> extends Serializable, Function<T1, R> {
};
}
/**
* Returns a composed function that first applies this Function1 to the given argument and then applies
* {@linkplain Function} {@code after} to the result.

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.control.Option;
import io.vavr.control.Try;
import java.io.Serializable;
@ -143,6 +145,7 @@ public interface Function2<T1, T2, R> extends Serializable, BiFunction<T1, T2, R
return (Function2<T1, T2, R>) f;
}
/**
* Applies this function to two arguments and returns the result.
*
@ -163,6 +166,7 @@ public interface Function2<T1, T2, R> extends Serializable, BiFunction<T1, T2, R
return (T2 t2) -> apply(t1, t2);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -236,6 +240,7 @@ public interface Function2<T1, T2, R> extends Serializable, BiFunction<T1, T2, R
return this instanceof Memoized;
}
/**
* Returns a composed function that first applies this Function2 to the given argument and then applies
* {@linkplain Function} {@code after} to the result.
@ -250,4 +255,5 @@ public interface Function2<T1, T2, R> extends Serializable, BiFunction<T1, T2, R
return (t1, t2) -> after.apply(apply(t1, t2));
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.control.Option;
import io.vavr.control.Try;
import java.io.Serializable;
@ -148,6 +150,7 @@ public interface Function3<T1, T2, T3, R> extends Serializable {
return (Function3<T1, T2, T3, R>) f;
}
/**
* Applies this function to three arguments and returns the result.
*
@ -180,6 +183,7 @@ public interface Function3<T1, T2, T3, R> extends Serializable {
return (T3 t3) -> apply(t1, t2, t3);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -253,6 +257,7 @@ public interface Function3<T1, T2, T3, R> extends Serializable {
return this instanceof Memoized;
}
/**
* Returns a composed function that first applies this Function3 to the given argument and then applies
* {@linkplain Function} {@code after} to the result.
@ -267,4 +272,5 @@ public interface Function3<T1, T2, T3, R> extends Serializable {
return (t1, t2, t3) -> after.apply(apply(t1, t2, t3));
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.control.Option;
import io.vavr.control.Try;
import java.io.Serializable;
@ -154,6 +156,7 @@ public interface Function4<T1, T2, T3, T4, R> extends Serializable {
return (Function4<T1, T2, T3, T4, R>) f;
}
/**
* Applies this function to 4 arguments and returns the result.
*
@ -199,6 +202,7 @@ public interface Function4<T1, T2, T3, T4, R> extends Serializable {
return (T4 t4) -> apply(t1, t2, t3, t4);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -272,6 +276,7 @@ public interface Function4<T1, T2, T3, T4, R> extends Serializable {
return this instanceof Memoized;
}
/**
* Returns a composed function that first applies this Function4 to the given argument and then applies
* {@linkplain Function} {@code after} to the result.
@ -286,4 +291,5 @@ public interface Function4<T1, T2, T3, T4, R> extends Serializable {
return (t1, t2, t3, t4) -> after.apply(apply(t1, t2, t3, t4));
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.control.Option;
import io.vavr.control.Try;
import java.io.Serializable;
@ -160,6 +162,7 @@ public interface Function5<T1, T2, T3, T4, T5, R> extends Serializable {
return (Function5<T1, T2, T3, T4, T5, R>) f;
}
/**
* Applies this function to 5 arguments and returns the result.
*
@ -219,6 +222,7 @@ public interface Function5<T1, T2, T3, T4, T5, R> extends Serializable {
return (T5 t5) -> apply(t1, t2, t3, t4, t5);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -292,6 +296,7 @@ public interface Function5<T1, T2, T3, T4, T5, R> extends Serializable {
return this instanceof Memoized;
}
/**
* Returns a composed function that first applies this Function5 to the given argument and then applies
* {@linkplain Function} {@code after} to the result.
@ -306,4 +311,5 @@ public interface Function5<T1, T2, T3, T4, T5, R> extends Serializable {
return (t1, t2, t3, t4, t5) -> after.apply(apply(t1, t2, t3, t4, t5));
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.control.Option;
import io.vavr.control.Try;
import java.io.Serializable;
@ -166,6 +168,7 @@ public interface Function6<T1, T2, T3, T4, T5, T6, R> extends Serializable {
return (Function6<T1, T2, T3, T4, T5, T6, R>) f;
}
/**
* Applies this function to 6 arguments and returns the result.
*
@ -240,6 +243,7 @@ public interface Function6<T1, T2, T3, T4, T5, T6, R> extends Serializable {
return (T6 t6) -> apply(t1, t2, t3, t4, t5, t6);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -313,6 +317,7 @@ public interface Function6<T1, T2, T3, T4, T5, T6, R> extends Serializable {
return this instanceof Memoized;
}
/**
* Returns a composed function that first applies this Function6 to the given argument and then applies
* {@linkplain Function} {@code after} to the result.
@ -327,4 +332,5 @@ public interface Function6<T1, T2, T3, T4, T5, T6, R> extends Serializable {
return (t1, t2, t3, t4, t5, t6) -> after.apply(apply(t1, t2, t3, t4, t5, t6));
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.control.Option;
import io.vavr.control.Try;
import java.io.Serializable;
@ -172,6 +174,7 @@ public interface Function7<T1, T2, T3, T4, T5, T6, T7, R> extends Serializable {
return (Function7<T1, T2, T3, T4, T5, T6, T7, R>) f;
}
/**
* Applies this function to 7 arguments and returns the result.
*
@ -262,6 +265,7 @@ public interface Function7<T1, T2, T3, T4, T5, T6, T7, R> extends Serializable {
return (T7 t7) -> apply(t1, t2, t3, t4, t5, t6, t7);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -335,6 +339,7 @@ public interface Function7<T1, T2, T3, T4, T5, T6, T7, R> extends Serializable {
return this instanceof Memoized;
}
/**
* Returns a composed function that first applies this Function7 to the given argument and then applies
* {@linkplain Function} {@code after} to the result.
@ -349,4 +354,5 @@ public interface Function7<T1, T2, T3, T4, T5, T6, T7, R> extends Serializable {
return (t1, t2, t3, t4, t5, t6, t7) -> after.apply(apply(t1, t2, t3, t4, t5, t6, t7));
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.control.Option;
import io.vavr.control.Try;
import java.io.Serializable;
@ -178,6 +180,7 @@ public interface Function8<T1, T2, T3, T4, T5, T6, T7, T8, R> extends Serializab
return (Function8<T1, T2, T3, T4, T5, T6, T7, T8, R>) f;
}
/**
* Applies this function to 8 arguments and returns the result.
*
@ -285,6 +288,7 @@ public interface Function8<T1, T2, T3, T4, T5, T6, T7, T8, R> extends Serializab
return (T8 t8) -> apply(t1, t2, t3, t4, t5, t6, t7, t8);
}
/**
* Returns the number of function arguments.
* @return an int value &gt;= 0
@ -358,6 +362,7 @@ public interface Function8<T1, T2, T3, T4, T5, T6, T7, T8, R> extends Serializab
return this instanceof Memoized;
}
/**
* Returns a composed function that first applies this Function8 to the given argument and then applies
* {@linkplain Function} {@code after} to the result.
@ -372,4 +377,5 @@ public interface Function8<T1, T2, T3, T4, T5, T6, T7, T8, R> extends Serializab
return (t1, t2, t3, t4, t5, t6, t7, t8) -> after.apply(apply(t1, t2, t3, t4, t5, t6, t7, t8));
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.collection.Seq;
import io.vavr.collection.Stream;
import java.util.Map;

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.collection.List;
import io.vavr.collection.Seq;
import java.io.Serializable;
@ -38,6 +40,7 @@ public final class Tuple0 implements Tuple, Comparable<Tuple0>, Serializable {
private static final long serialVersionUID = 1L;
/**
* The singleton instance of Tuple0.
*/
@ -65,6 +68,7 @@ public final class Tuple0 implements Tuple, Comparable<Tuple0>, Serializable {
return COMPARATOR;
}
@Override
public int arity() {
return 0;
@ -75,6 +79,7 @@ public final class Tuple0 implements Tuple, Comparable<Tuple0>, Serializable {
return 0;
}
/**
* Transforms this tuple to an object of type U.
*

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.collection.List;
import io.vavr.collection.Seq;
import java.io.Serializable;
@ -108,6 +110,7 @@ public final class Tuple1<T1> implements Tuple, Comparable<Tuple1<T1>>, Serializ
return new Tuple1<>(value);
}
/**
* Maps the components of this tuple using a mapper function.
*
@ -121,6 +124,7 @@ public final class Tuple1<T1> implements Tuple, Comparable<Tuple1<T1>>, Serializ
return Tuple.of(mapper.apply(_1));
}
/**
* Transforms this tuple to an object of type U.
*
@ -286,4 +290,5 @@ public final class Tuple1<T1> implements Tuple, Comparable<Tuple1<T1>>, Serializ
return "(" + _1 + ")";
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.collection.List;
import io.vavr.collection.Seq;
import java.io.Serializable;
@ -357,7 +359,7 @@ public final class Tuple2<T1, T2> implements Tuple, Comparable<Tuple2<T1, T2>>,
} else {
final Tuple2<?, ?> that = (Tuple2<?, ?>) o;
return Objects.equals(this._1, that._1)
&& Objects.equals(this._2, that._2);
&& Objects.equals(this._2, that._2);
}
}
@ -371,4 +373,5 @@ public final class Tuple2<T1, T2> implements Tuple, Comparable<Tuple2<T1, T2>>,
return "(" + _1 + ", " + _2 + ")";
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.collection.List;
import io.vavr.collection.Seq;
import java.io.Serializable;
@ -182,6 +184,7 @@ public final class Tuple3<T1, T2, T3> implements Tuple, Comparable<Tuple3<T1, T2
return new Tuple3<>(_1, _2, value);
}
/**
* Maps the components of this tuple using a mapper function.
*
@ -370,8 +373,8 @@ public final class Tuple3<T1, T2, T3> implements Tuple, Comparable<Tuple3<T1, T2
} else {
final Tuple3<?, ?, ?> that = (Tuple3<?, ?, ?>) o;
return Objects.equals(this._1, that._1)
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3);
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3);
}
}
@ -385,4 +388,5 @@ public final class Tuple3<T1, T2, T3> implements Tuple, Comparable<Tuple3<T1, T2
return "(" + _1 + ", " + _2 + ", " + _3 + ")";
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.collection.List;
import io.vavr.collection.Seq;
import java.io.Serializable;
@ -219,6 +221,7 @@ public final class Tuple4<T1, T2, T3, T4> implements Tuple, Comparable<Tuple4<T1
return new Tuple4<>(_1, _2, _3, value);
}
/**
* Maps the components of this tuple using a mapper function.
*
@ -407,9 +410,9 @@ public final class Tuple4<T1, T2, T3, T4> implements Tuple, Comparable<Tuple4<T1
} else {
final Tuple4<?, ?, ?, ?> that = (Tuple4<?, ?, ?, ?>) o;
return Objects.equals(this._1, that._1)
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3)
&& Objects.equals(this._4, that._4);
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3)
&& Objects.equals(this._4, that._4);
}
}
@ -423,4 +426,5 @@ public final class Tuple4<T1, T2, T3, T4> implements Tuple, Comparable<Tuple4<T1
return "(" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + ")";
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.collection.List;
import io.vavr.collection.Seq;
import java.io.Serializable;
@ -256,6 +258,7 @@ public final class Tuple5<T1, T2, T3, T4, T5> implements Tuple, Comparable<Tuple
return new Tuple5<>(_1, _2, _3, _4, value);
}
/**
* Maps the components of this tuple using a mapper function.
*
@ -445,10 +448,10 @@ public final class Tuple5<T1, T2, T3, T4, T5> implements Tuple, Comparable<Tuple
} else {
final Tuple5<?, ?, ?, ?, ?> that = (Tuple5<?, ?, ?, ?, ?>) o;
return Objects.equals(this._1, that._1)
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3)
&& Objects.equals(this._4, that._4)
&& Objects.equals(this._5, that._5);
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3)
&& Objects.equals(this._4, that._4)
&& Objects.equals(this._5, that._5);
}
}
@ -462,4 +465,5 @@ public final class Tuple5<T1, T2, T3, T4, T5> implements Tuple, Comparable<Tuple
return "(" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + ", " + _5 + ")";
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.collection.List;
import io.vavr.collection.Seq;
import java.io.Serializable;
@ -293,6 +295,7 @@ public final class Tuple6<T1, T2, T3, T4, T5, T6> implements Tuple, Comparable<T
return new Tuple6<>(_1, _2, _3, _4, _5, value);
}
/**
* Maps the components of this tuple using a mapper function.
*
@ -484,11 +487,11 @@ public final class Tuple6<T1, T2, T3, T4, T5, T6> implements Tuple, Comparable<T
} else {
final Tuple6<?, ?, ?, ?, ?, ?> that = (Tuple6<?, ?, ?, ?, ?, ?>) o;
return Objects.equals(this._1, that._1)
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3)
&& Objects.equals(this._4, that._4)
&& Objects.equals(this._5, that._5)
&& Objects.equals(this._6, that._6);
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3)
&& Objects.equals(this._4, that._4)
&& Objects.equals(this._5, that._5)
&& Objects.equals(this._6, that._6);
}
}
@ -502,4 +505,5 @@ public final class Tuple6<T1, T2, T3, T4, T5, T6> implements Tuple, Comparable<T
return "(" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + ", " + _5 + ", " + _6 + ")";
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.collection.List;
import io.vavr.collection.Seq;
import java.io.Serializable;
@ -330,6 +332,7 @@ public final class Tuple7<T1, T2, T3, T4, T5, T6, T7> implements Tuple, Comparab
return new Tuple7<>(_1, _2, _3, _4, _5, _6, value);
}
/**
* Maps the components of this tuple using a mapper function.
*
@ -524,12 +527,12 @@ public final class Tuple7<T1, T2, T3, T4, T5, T6, T7> implements Tuple, Comparab
} else {
final Tuple7<?, ?, ?, ?, ?, ?, ?> that = (Tuple7<?, ?, ?, ?, ?, ?, ?>) o;
return Objects.equals(this._1, that._1)
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3)
&& Objects.equals(this._4, that._4)
&& Objects.equals(this._5, that._5)
&& Objects.equals(this._6, that._6)
&& Objects.equals(this._7, that._7);
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3)
&& Objects.equals(this._4, that._4)
&& Objects.equals(this._5, that._5)
&& Objects.equals(this._6, that._6)
&& Objects.equals(this._7, that._7);
}
}
@ -543,4 +546,5 @@ public final class Tuple7<T1, T2, T3, T4, T5, T6, T7> implements Tuple, Comparab
return "(" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + ", " + _5 + ", " + _6 + ", " + _7 + ")";
}
}

View File

@ -23,6 +23,8 @@ package io.vavr;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import io.vavr.collection.List;
import io.vavr.collection.Seq;
import java.io.Serializable;
@ -367,6 +369,7 @@ public final class Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> implements Tuple, Comp
return new Tuple8<>(_1, _2, _3, _4, _5, _6, _7, value);
}
/**
* Maps the components of this tuple using a mapper function.
*
@ -543,6 +546,7 @@ public final class Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> implements Tuple, Comp
return List.of(_1, _2, _3, _4, _5, _6, _7, _8);
}
// -- Object
@Override
@ -554,13 +558,13 @@ public final class Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> implements Tuple, Comp
} else {
final Tuple8<?, ?, ?, ?, ?, ?, ?, ?> that = (Tuple8<?, ?, ?, ?, ?, ?, ?, ?>) o;
return Objects.equals(this._1, that._1)
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3)
&& Objects.equals(this._4, that._4)
&& Objects.equals(this._5, that._5)
&& Objects.equals(this._6, that._6)
&& Objects.equals(this._7, that._7)
&& Objects.equals(this._8, that._8);
&& Objects.equals(this._2, that._2)
&& Objects.equals(this._3, that._3)
&& Objects.equals(this._4, that._4)
&& Objects.equals(this._5, that._5)
&& Objects.equals(this._6, that._6)
&& Objects.equals(this._7, that._7)
&& Objects.equals(this._8, that._8);
}
}
@ -574,4 +578,5 @@ public final class Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> implements Tuple, Comp
return "(" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + ", " + _5 + ", " + _6 + ", " + _7 + ", " + _8 + ")";
}
}

View File

@ -23,6 +23,8 @@ package io.vavr.collection;
G E N E R A T O R C R A F T E D
\*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
import java.io.Serializable;
import java.util.Collection;

View File

@ -401,7 +401,6 @@ public class APITest {
public void shouldArrayWithVarArgReturnNotNull() {
assertThat(Array('1', '2', '3')).isNotNull();
}
@Test
public void shouldEmptyVectorReturnNotNull() {
assertThat(Vector()).isNotNull();
@ -416,7 +415,6 @@ public class APITest {
public void shouldVectorWithVarArgReturnNotNull() {
assertThat(Vector('1', '2', '3')).isNotNull();
}
@Test
public void shouldEmptyListReturnNotNull() {
assertThat(List()).isNotNull();
@ -431,7 +429,6 @@ public class APITest {
public void shouldListWithVarArgReturnNotNull() {
assertThat(List('1', '2', '3')).isNotNull();
}
@Test
public void shouldEmptyStreamReturnNotNull() {
assertThat(Stream()).isNotNull();
@ -446,7 +443,6 @@ public class APITest {
public void shouldStreamWithVarArgReturnNotNull() {
assertThat(Stream('1', '2', '3')).isNotNull();
}
@Test
public void shouldEmptyQueueReturnNotNull() {
assertThat(Queue()).isNotNull();
@ -461,7 +457,6 @@ public class APITest {
public void shouldQueueWithVarArgReturnNotNull() {
assertThat(Queue('1', '2', '3')).isNotNull();
}
@Test
public void shouldEmptyLinkedSetReturnNotNull() {
assertThat(LinkedSet()).isNotNull();
@ -476,7 +471,6 @@ public class APITest {
public void shouldLinkedSetWithVarArgReturnNotNull() {
assertThat(LinkedSet('1', '2', '3')).isNotNull();
}
@Test
public void shouldEmptySetReturnNotNull() {
assertThat(Set()).isNotNull();
@ -491,7 +485,6 @@ public class APITest {
public void shouldSetWithVarArgReturnNotNull() {
assertThat(Set('1', '2', '3')).isNotNull();
}
@Test
public void shouldEmptySeqReturnNotNull() {
assertThat(Seq()).isNotNull();
@ -506,7 +499,6 @@ public class APITest {
public void shouldSeqWithVarArgReturnNotNull() {
assertThat(Seq('1', '2', '3')).isNotNull();
}
@Test
public void shouldEmptyIndexedSeqReturnNotNull() {
assertThat(IndexedSeq()).isNotNull();
@ -551,7 +543,6 @@ public class APITest {
public void shouldSortedSetWithVarArgAndComparatorReturnNotNull() {
assertThat(SortedSet((Comparator<Character>) Character::compareTo, '1', '2', '3')).isNotNull();
}
@Test
public void shouldEmptyPriorityQueueReturnNotNull() {
assertThat(PriorityQueue()).isNotNull();
@ -706,7 +697,6 @@ public class APITest {
assertThat(map.apply(9)).isEqualTo(18);
assertThat(map.apply(10)).isEqualTo(20);
}
@Test
public void shouldEmptyMapReturnNotNull() {
assertThat(Map()).isNotNull();
@ -831,7 +821,6 @@ public class APITest {
assertThat(map.apply(9)).isEqualTo(18);
assertThat(map.apply(10)).isEqualTo(20);
}
@Test
public void shouldEmptySortedMapReturnNotNull() {
assertThat(SortedMap()).isNotNull();
@ -956,7 +945,6 @@ public class APITest {
assertThat(map.apply(9)).isEqualTo(18);
assertThat(map.apply(10)).isEqualTo(20);
}
@Test
public void shouldEmptySortedMapFromComparatorReturnNotNull() {
assertThat(SortedMap(Integer::compareTo)).isNotNull();

View File

@ -50,6 +50,7 @@ public class CheckedFunction0Test {
assertThat(CheckedFunction0.lift(() -> { while(true); })).isNotNull();
}
@Test
public void shouldGetArity() {
final CheckedFunction0<Object> f = () -> null;
@ -101,6 +102,7 @@ public class CheckedFunction0Test {
assertThat(memo.memoized() == memo).isTrue();
}
@Test
public void shouldRecognizeMemoizedFunctions() {
final CheckedFunction0<Integer> f = () -> null;
@ -109,6 +111,7 @@ public class CheckedFunction0Test {
assertThat(memo.isMemoized()).isTrue();
}
@Test
public void shouldRecover() {
final AtomicInteger integer = new AtomicInteger();
@ -192,6 +195,7 @@ public class CheckedFunction0Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow() throws Throwable{
final CheckedFunction0<String> wideFunction = () -> "Zero args";
@ -200,4 +204,5 @@ public class CheckedFunction0Test {
assertThat(narrowFunction.apply()).isEqualTo("Zero args");
}
}

View File

@ -57,6 +57,7 @@ public class CheckedFunction1Test {
assertThat(identity.apply(s)).isEqualTo(s);
}
@Test
public void shouldGetArity() {
final CheckedFunction1<Object, Object> f = (o1) -> null;
@ -126,6 +127,7 @@ public class CheckedFunction1Test {
assertThat(memo.isMemoized()).isTrue();
}
private static final CheckedFunction1<String, MessageDigest> digest = (s1) -> MessageDigest.getInstance(s1);
@Test
@ -206,6 +208,7 @@ public class CheckedFunction1Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow() throws Throwable{
final CheckedFunction1<Number, String> wideFunction = (o1) -> String.format("Numbers are: %s", o1);

View File

@ -50,6 +50,7 @@ public class CheckedFunction2Test {
assertThat(CheckedFunction2.lift((o1, o2) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() throws Throwable {
final CheckedFunction2<Object, Object, Object> f = (o1, o2) -> null;
@ -125,6 +126,7 @@ public class CheckedFunction2Test {
assertThat(memo.isMemoized()).isTrue();
}
private static final CheckedFunction2<String, String, MessageDigest> digest = (s1, s2) -> MessageDigest.getInstance(s1 + s2);
@Test
@ -197,6 +199,7 @@ public class CheckedFunction2Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow() throws Throwable{
final CheckedFunction2<Number, Number, String> wideFunction = (o1, o2) -> String.format("Numbers are: %s, %s", o1, o2);

View File

@ -50,6 +50,7 @@ public class CheckedFunction3Test {
assertThat(CheckedFunction3.lift((o1, o2, o3) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() throws Throwable {
final CheckedFunction3<Object, Object, Object, Object> f = (o1, o2, o3) -> null;
@ -126,6 +127,7 @@ public class CheckedFunction3Test {
assertThat(memo.isMemoized()).isTrue();
}
private static final CheckedFunction3<String, String, String, MessageDigest> digest = (s1, s2, s3) -> MessageDigest.getInstance(s1 + s2 + s3);
@Test
@ -198,6 +200,7 @@ public class CheckedFunction3Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow() throws Throwable{
final CheckedFunction3<Number, Number, Number, String> wideFunction = (o1, o2, o3) -> String.format("Numbers are: %s, %s, %s", o1, o2, o3);

View File

@ -50,6 +50,7 @@ public class CheckedFunction4Test {
assertThat(CheckedFunction4.lift((o1, o2, o3, o4) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() throws Throwable {
final CheckedFunction4<Object, Object, Object, Object, Object> f = (o1, o2, o3, o4) -> null;
@ -127,6 +128,7 @@ public class CheckedFunction4Test {
assertThat(memo.isMemoized()).isTrue();
}
private static final CheckedFunction4<String, String, String, String, MessageDigest> digest = (s1, s2, s3, s4) -> MessageDigest.getInstance(s1 + s2 + s3 + s4);
@Test
@ -199,6 +201,7 @@ public class CheckedFunction4Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow() throws Throwable{
final CheckedFunction4<Number, Number, Number, Number, String> wideFunction = (o1, o2, o3, o4) -> String.format("Numbers are: %s, %s, %s, %s", o1, o2, o3, o4);

View File

@ -50,6 +50,7 @@ public class CheckedFunction5Test {
assertThat(CheckedFunction5.lift((o1, o2, o3, o4, o5) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() throws Throwable {
final CheckedFunction5<Object, Object, Object, Object, Object, Object> f = (o1, o2, o3, o4, o5) -> null;
@ -128,6 +129,7 @@ public class CheckedFunction5Test {
assertThat(memo.isMemoized()).isTrue();
}
private static final CheckedFunction5<String, String, String, String, String, MessageDigest> digest = (s1, s2, s3, s4, s5) -> MessageDigest.getInstance(s1 + s2 + s3 + s4 + s5);
@Test
@ -200,6 +202,7 @@ public class CheckedFunction5Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow() throws Throwable{
final CheckedFunction5<Number, Number, Number, Number, Number, String> wideFunction = (o1, o2, o3, o4, o5) -> String.format("Numbers are: %s, %s, %s, %s, %s", o1, o2, o3, o4, o5);

View File

@ -50,6 +50,7 @@ public class CheckedFunction6Test {
assertThat(CheckedFunction6.lift((o1, o2, o3, o4, o5, o6) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() throws Throwable {
final CheckedFunction6<Object, Object, Object, Object, Object, Object, Object> f = (o1, o2, o3, o4, o5, o6) -> null;
@ -129,6 +130,7 @@ public class CheckedFunction6Test {
assertThat(memo.isMemoized()).isTrue();
}
private static final CheckedFunction6<String, String, String, String, String, String, MessageDigest> digest = (s1, s2, s3, s4, s5, s6) -> MessageDigest.getInstance(s1 + s2 + s3 + s4 + s5 + s6);
@Test
@ -201,6 +203,7 @@ public class CheckedFunction6Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow() throws Throwable{
final CheckedFunction6<Number, Number, Number, Number, Number, Number, String> wideFunction = (o1, o2, o3, o4, o5, o6) -> String.format("Numbers are: %s, %s, %s, %s, %s, %s", o1, o2, o3, o4, o5, o6);

View File

@ -50,6 +50,7 @@ public class CheckedFunction7Test {
assertThat(CheckedFunction7.lift((o1, o2, o3, o4, o5, o6, o7) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() throws Throwable {
final CheckedFunction7<Object, Object, Object, Object, Object, Object, Object, Object> f = (o1, o2, o3, o4, o5, o6, o7) -> null;
@ -130,6 +131,7 @@ public class CheckedFunction7Test {
assertThat(memo.isMemoized()).isTrue();
}
private static final CheckedFunction7<String, String, String, String, String, String, String, MessageDigest> digest = (s1, s2, s3, s4, s5, s6, s7) -> MessageDigest.getInstance(s1 + s2 + s3 + s4 + s5 + s6 + s7);
@Test
@ -202,6 +204,7 @@ public class CheckedFunction7Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow() throws Throwable{
final CheckedFunction7<Number, Number, Number, Number, Number, Number, Number, String> wideFunction = (o1, o2, o3, o4, o5, o6, o7) -> String.format("Numbers are: %s, %s, %s, %s, %s, %s, %s", o1, o2, o3, o4, o5, o6, o7);

View File

@ -50,6 +50,7 @@ public class CheckedFunction8Test {
assertThat(CheckedFunction8.lift((o1, o2, o3, o4, o5, o6, o7, o8) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() throws Throwable {
final CheckedFunction8<Object, Object, Object, Object, Object, Object, Object, Object, Object> f = (o1, o2, o3, o4, o5, o6, o7, o8) -> null;
@ -131,6 +132,7 @@ public class CheckedFunction8Test {
assertThat(memo.isMemoized()).isTrue();
}
private static final CheckedFunction8<String, String, String, String, String, String, String, String, MessageDigest> digest = (s1, s2, s3, s4, s5, s6, s7, s8) -> MessageDigest.getInstance(s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8);
@Test
@ -203,6 +205,7 @@ public class CheckedFunction8Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow() throws Throwable{
final CheckedFunction8<Number, Number, Number, Number, Number, Number, Number, Number, String> wideFunction = (o1, o2, o3, o4, o5, o6, o7, o8) -> String.format("Numbers are: %s, %s, %s, %s, %s, %s, %s, %s", o1, o2, o3, o4, o5, o6, o7, o8);

View File

@ -48,6 +48,7 @@ public class Function0Test {
assertThat(Function0.lift(() -> { while(true); })).isNotNull();
}
@Test
public void shouldGetValue() {
final String s = "test";
@ -55,6 +56,7 @@ public class Function0Test {
assertThat(supplier.get()).isEqualTo(s);
}
@Test
public void shouldGetArity() {
final Function0<Object> f = () -> null;
@ -106,6 +108,7 @@ public class Function0Test {
assertThat(memo.memoized() == memo).isTrue();
}
@Test
public void shouldRecognizeMemoizedFunctions() {
final Function0<Integer> f = () -> null;
@ -114,6 +117,7 @@ public class Function0Test {
assertThat(memo.isMemoized()).isTrue();
}
@Test
public void shouldLiftTryPartialFunction() {
AtomicInteger integer = new AtomicInteger();
@ -131,6 +135,7 @@ public class Function0Test {
assertThat(res.get()).isEqualTo(10);
}
private static final Function0<Integer> recurrent1 = () -> 11;
@Test
@ -147,6 +152,7 @@ public class Function0Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow(){
final Function0<String> wideFunction = () -> "Zero args";
@ -155,4 +161,5 @@ public class Function0Test {
assertThat(narrowFunction.apply()).isEqualTo("Zero args");
}
}

View File

@ -56,6 +56,7 @@ public class Function1Test {
assertThat(identity.apply(s)).isEqualTo(s);
}
@Test
public void shouldGetArity() {
final Function1<Object, Object> f = (o1) -> null;
@ -160,6 +161,7 @@ public class Function1Test {
assertThat(res.get()).isEqualTo(10);
}
private static final Function1<Integer, Integer> recurrent1 = (i1) -> i1 <= 0 ? i1 : Function1Test.recurrent2.apply(i1 - 1) + 1;
private static final Function1<Integer, Integer> recurrent2 = Function1Test.recurrent1.memoized();
@ -185,6 +187,7 @@ public class Function1Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow(){
final Function1<Number, String> wideFunction = (o1) -> String.format("Numbers are: %s", o1);

View File

@ -48,6 +48,7 @@ public class Function2Test {
assertThat(Function2.lift((o1, o2) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() {
final Function2<Object, Object, Object> f = (o1, o2) -> null;
@ -123,6 +124,7 @@ public class Function2Test {
assertThat(memo.isMemoized()).isTrue();
}
@Test
public void shouldLiftTryPartialFunction() {
AtomicInteger integer = new AtomicInteger();
@ -140,6 +142,7 @@ public class Function2Test {
assertThat(res.get()).isEqualTo(10);
}
private static final Function2<Integer, Integer, Integer> recurrent1 = (i1, i2) -> i1 <= 0 ? i1 : Function2Test.recurrent2.apply(i1 - 1, i2) + 1;
private static final Function2<Integer, Integer, Integer> recurrent2 = Function2Test.recurrent1.memoized();
@ -157,6 +160,7 @@ public class Function2Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow(){
final Function2<Number, Number, String> wideFunction = (o1, o2) -> String.format("Numbers are: %s, %s", o1, o2);

View File

@ -48,6 +48,7 @@ public class Function3Test {
assertThat(Function3.lift((o1, o2, o3) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() {
final Function3<Object, Object, Object, Object> f = (o1, o2, o3) -> null;
@ -124,6 +125,7 @@ public class Function3Test {
assertThat(memo.isMemoized()).isTrue();
}
@Test
public void shouldLiftTryPartialFunction() {
AtomicInteger integer = new AtomicInteger();
@ -141,6 +143,7 @@ public class Function3Test {
assertThat(res.get()).isEqualTo(10);
}
private static final Function3<Integer, Integer, Integer, Integer> recurrent1 = (i1, i2, i3) -> i1 <= 0 ? i1 : Function3Test.recurrent2.apply(i1 - 1, i2, i3) + 1;
private static final Function3<Integer, Integer, Integer, Integer> recurrent2 = Function3Test.recurrent1.memoized();
@ -158,6 +161,7 @@ public class Function3Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow(){
final Function3<Number, Number, Number, String> wideFunction = (o1, o2, o3) -> String.format("Numbers are: %s, %s, %s", o1, o2, o3);

View File

@ -48,6 +48,7 @@ public class Function4Test {
assertThat(Function4.lift((o1, o2, o3, o4) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() {
final Function4<Object, Object, Object, Object, Object> f = (o1, o2, o3, o4) -> null;
@ -125,6 +126,7 @@ public class Function4Test {
assertThat(memo.isMemoized()).isTrue();
}
@Test
public void shouldLiftTryPartialFunction() {
AtomicInteger integer = new AtomicInteger();
@ -142,6 +144,7 @@ public class Function4Test {
assertThat(res.get()).isEqualTo(10);
}
private static final Function4<Integer, Integer, Integer, Integer, Integer> recurrent1 = (i1, i2, i3, i4) -> i1 <= 0 ? i1 : Function4Test.recurrent2.apply(i1 - 1, i2, i3, i4) + 1;
private static final Function4<Integer, Integer, Integer, Integer, Integer> recurrent2 = Function4Test.recurrent1.memoized();
@ -159,6 +162,7 @@ public class Function4Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow(){
final Function4<Number, Number, Number, Number, String> wideFunction = (o1, o2, o3, o4) -> String.format("Numbers are: %s, %s, %s, %s", o1, o2, o3, o4);

View File

@ -48,6 +48,7 @@ public class Function5Test {
assertThat(Function5.lift((o1, o2, o3, o4, o5) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() {
final Function5<Object, Object, Object, Object, Object, Object> f = (o1, o2, o3, o4, o5) -> null;
@ -126,6 +127,7 @@ public class Function5Test {
assertThat(memo.isMemoized()).isTrue();
}
@Test
public void shouldLiftTryPartialFunction() {
AtomicInteger integer = new AtomicInteger();
@ -143,6 +145,7 @@ public class Function5Test {
assertThat(res.get()).isEqualTo(10);
}
private static final Function5<Integer, Integer, Integer, Integer, Integer, Integer> recurrent1 = (i1, i2, i3, i4, i5) -> i1 <= 0 ? i1 : Function5Test.recurrent2.apply(i1 - 1, i2, i3, i4, i5) + 1;
private static final Function5<Integer, Integer, Integer, Integer, Integer, Integer> recurrent2 = Function5Test.recurrent1.memoized();
@ -160,6 +163,7 @@ public class Function5Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow(){
final Function5<Number, Number, Number, Number, Number, String> wideFunction = (o1, o2, o3, o4, o5) -> String.format("Numbers are: %s, %s, %s, %s, %s", o1, o2, o3, o4, o5);

View File

@ -48,6 +48,7 @@ public class Function6Test {
assertThat(Function6.lift((o1, o2, o3, o4, o5, o6) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() {
final Function6<Object, Object, Object, Object, Object, Object, Object> f = (o1, o2, o3, o4, o5, o6) -> null;
@ -127,6 +128,7 @@ public class Function6Test {
assertThat(memo.isMemoized()).isTrue();
}
@Test
public void shouldLiftTryPartialFunction() {
AtomicInteger integer = new AtomicInteger();
@ -144,6 +146,7 @@ public class Function6Test {
assertThat(res.get()).isEqualTo(10);
}
private static final Function6<Integer, Integer, Integer, Integer, Integer, Integer, Integer> recurrent1 = (i1, i2, i3, i4, i5, i6) -> i1 <= 0 ? i1 : Function6Test.recurrent2.apply(i1 - 1, i2, i3, i4, i5, i6) + 1;
private static final Function6<Integer, Integer, Integer, Integer, Integer, Integer, Integer> recurrent2 = Function6Test.recurrent1.memoized();
@ -161,6 +164,7 @@ public class Function6Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow(){
final Function6<Number, Number, Number, Number, Number, Number, String> wideFunction = (o1, o2, o3, o4, o5, o6) -> String.format("Numbers are: %s, %s, %s, %s, %s, %s", o1, o2, o3, o4, o5, o6);

View File

@ -48,6 +48,7 @@ public class Function7Test {
assertThat(Function7.lift((o1, o2, o3, o4, o5, o6, o7) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() {
final Function7<Object, Object, Object, Object, Object, Object, Object, Object> f = (o1, o2, o3, o4, o5, o6, o7) -> null;
@ -128,6 +129,7 @@ public class Function7Test {
assertThat(memo.isMemoized()).isTrue();
}
@Test
public void shouldLiftTryPartialFunction() {
AtomicInteger integer = new AtomicInteger();
@ -145,6 +147,7 @@ public class Function7Test {
assertThat(res.get()).isEqualTo(10);
}
private static final Function7<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer> recurrent1 = (i1, i2, i3, i4, i5, i6, i7) -> i1 <= 0 ? i1 : Function7Test.recurrent2.apply(i1 - 1, i2, i3, i4, i5, i6, i7) + 1;
private static final Function7<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer> recurrent2 = Function7Test.recurrent1.memoized();
@ -162,6 +165,7 @@ public class Function7Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow(){
final Function7<Number, Number, Number, Number, Number, Number, Number, String> wideFunction = (o1, o2, o3, o4, o5, o6, o7) -> String.format("Numbers are: %s, %s, %s, %s, %s, %s, %s", o1, o2, o3, o4, o5, o6, o7);

View File

@ -48,6 +48,7 @@ public class Function8Test {
assertThat(Function8.lift((o1, o2, o3, o4, o5, o6, o7, o8) -> { while(true); })).isNotNull();
}
@Test
public void shouldPartiallyApply() {
final Function8<Object, Object, Object, Object, Object, Object, Object, Object, Object> f = (o1, o2, o3, o4, o5, o6, o7, o8) -> null;
@ -129,6 +130,7 @@ public class Function8Test {
assertThat(memo.isMemoized()).isTrue();
}
@Test
public void shouldLiftTryPartialFunction() {
AtomicInteger integer = new AtomicInteger();
@ -146,6 +148,7 @@ public class Function8Test {
assertThat(res.get()).isEqualTo(10);
}
private static final Function8<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer> recurrent1 = (i1, i2, i3, i4, i5, i6, i7, i8) -> i1 <= 0 ? i1 : Function8Test.recurrent2.apply(i1 - 1, i2, i3, i4, i5, i6, i7, i8) + 1;
private static final Function8<Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer> recurrent2 = Function8Test.recurrent1.memoized();
@ -163,6 +166,7 @@ public class Function8Test {
assertThat(composed).isNotNull();
}
@Test
public void shouldNarrow(){
final Function8<Number, Number, Number, Number, Number, Number, Number, Number, String> wideFunction = (o1, o2, o3, o4, o5, o6, o7, o8) -> String.format("Numbers are: %s, %s, %s, %s, %s, %s, %s, %s", o1, o2, o3, o4, o5, o6, o7, o8);

View File

@ -45,6 +45,7 @@ public class Tuple0Test {
assertThat(tuple.arity()).isEqualTo(0);
}
@Test
public void shouldConvertToSeq() {
final Seq<?> actual = createIntTuple().toSeq();
@ -58,6 +59,7 @@ public class Tuple0Test {
assertThat(intTupleComparator.compare(t0, t0)).isZero();
}
@Test
public void shouldApplyTuple() {
final Tuple0 tuple = createTuple();
@ -142,6 +144,7 @@ public class Tuple0Test {
assertThat(tuple).isNotEqualTo(other);
}
@Test
public void shouldComputeCorrectHashCode() {
final int actual = createTuple().hashCode();

View File

@ -81,6 +81,7 @@ public class Tuple1Test {
assertThat(intTupleComparator.compare(t1, t0)).isPositive();
}
@Test
public void shouldMap() {
final Tuple1<Object> tuple = createTuple();
@ -103,6 +104,7 @@ public class Tuple1Test {
assertThat(Tuple.sequence1(iterable)).isEqualTo(expected);
}
@Test
public void shouldApplyTuple() {
final Tuple1<Object> tuple = createTuple();

View File

@ -121,6 +121,7 @@ public class Tuple3Test {
assertThat(intTupleComparator.compare(t3, t0)).isPositive();
}
@Test
public void shouldMap() {
final Tuple3<Object, Object, Object> tuple = createTuple();

View File

@ -144,6 +144,7 @@ public class Tuple4Test {
assertThat(intTupleComparator.compare(t4, t0)).isPositive();
}
@Test
public void shouldMap() {
final Tuple4<Object, Object, Object, Object> tuple = createTuple();

View File

@ -169,6 +169,7 @@ public class Tuple5Test {
assertThat(intTupleComparator.compare(t5, t0)).isPositive();
}
@Test
public void shouldMap() {
final Tuple5<Object, Object, Object, Object, Object> tuple = createTuple();

View File

@ -196,6 +196,7 @@ public class Tuple6Test {
assertThat(intTupleComparator.compare(t6, t0)).isPositive();
}
@Test
public void shouldMap() {
final Tuple6<Object, Object, Object, Object, Object, Object> tuple = createTuple();

View File

@ -225,6 +225,7 @@ public class Tuple7Test {
assertThat(intTupleComparator.compare(t7, t0)).isPositive();
}
@Test
public void shouldMap() {
final Tuple7<Object, Object, Object, Object, Object, Object, Object> tuple = createTuple();

View File

@ -256,6 +256,7 @@ public class Tuple8Test {
assertThat(intTupleComparator.compare(t8, t0)).isPositive();
}
@Test
public void shouldMap() {
final Tuple8<Object, Object, Object, Object, Object, Object, Object, Object> tuple = createTuple();
@ -355,6 +356,7 @@ public class Tuple8Test {
assertThat(actual).isEqualTo(Tuple0.instance());
}
@Test
public void shouldRecognizeEquality() {
final Tuple8<Object, Object, Object, Object, Object, Object, Object, Object> tuple1 = createTuple();

View File

@ -22,77 +22,57 @@ package io.vavr;
import io.vavr.control.Either;
import io.vavr.control.Try;
import io.vavr.control.Validation;
import io.vavr.match.annotation.Patterns;
import io.vavr.match.annotation.Unapply;
import io.vavr.collection.List;
import io.vavr.concurrent.Future;
import io.vavr.control.Option;
/**
* <strong>INTERNAL TYPE - turned to io.vavr.Patterns by vavr-match annotation processor.</strong>
*
* @deprecated Will be removed in the next major version, along with VAVR's pattern matching, in favor of Java's native pattern matching.
*/
@Patterns
@Deprecated
class $ {
// -- io.vavr
// Tuple0-N
@Unapply
static Tuple0 Tuple0(Tuple0 tuple0) { return tuple0; }
@Unapply
static <T1> Tuple1<T1> Tuple1(Tuple1<T1> tuple1) { return tuple1; }
@Unapply
static <T1, T2> Tuple2<T1, T2> Tuple2(Tuple2<T1, T2> tuple2) { return tuple2; }
@Unapply
static <T1, T2, T3> Tuple3<T1, T2, T3> Tuple3(Tuple3<T1, T2, T3> tuple3) { return tuple3; }
@Unapply
static <T1, T2, T3, T4> Tuple4<T1, T2, T3, T4> Tuple4(Tuple4<T1, T2, T3, T4> tuple4) { return tuple4; }
@Unapply
static <T1, T2, T3, T4, T5> Tuple5<T1, T2, T3, T4, T5> Tuple5(Tuple5<T1, T2, T3, T4, T5> tuple5) { return tuple5; }
@Unapply
static <T1, T2, T3, T4, T5, T6> Tuple6<T1, T2, T3, T4, T5, T6> Tuple6(Tuple6<T1, T2, T3, T4, T5, T6> tuple6) { return tuple6; }
@Unapply
static <T1, T2, T3, T4, T5, T6, T7> Tuple7<T1, T2, T3, T4, T5, T6, T7> Tuple7(Tuple7<T1, T2, T3, T4, T5, T6, T7> tuple7) { return tuple7; }
@Unapply
static <T1, T2, T3, T4, T5, T6, T7, T8> Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> Tuple8(Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> tuple8) { return tuple8; }
// -- io.vavr.collection
// List
@Unapply
static <T> Tuple2<T, List<T>> Cons(List.Cons<T> cons) { return Tuple.of(cons.head(), cons.tail()); }
@Unapply
static <T> Tuple0 Nil(List.Nil<T> nil) { return Tuple.empty(); }
// -- io.vavr.concurrent
@Unapply
static <T> Tuple1<Option<Try<T>>> Future(Future<T> future) { return Tuple.of(future.getValue()); }
// -- io.vavr.control
// Either
@Unapply
static <L, R> Tuple1<R> Right(Either.Right<L, R> right) { return Tuple.of(right.get()); }
@Unapply
static <L, R> Tuple1<L> Left(Either.Left<L, R> left) { return Tuple.of(left.getLeft()); }
// Option
@Unapply
static <T> Tuple1<T> Some(Option.Some<T> some) { return Tuple.of(some.get()); }
@Unapply
static <T> Tuple0 None(Option.None<T> none) { return Tuple.empty(); }
// Try
@Unapply
static <T> Tuple1<T> Success(Try.Success<T> success) { return Tuple.of(success.get()); }
@Unapply
static <T> Tuple1<Throwable> Failure(Try.Failure<T> failure) { return Tuple.of(failure.getCause()); }
// Validation
@Unapply
static <E, T> Tuple1<T> Valid(Validation.Valid<E, T> valid) { return Tuple.of(valid.get()); }
@Unapply
static <E, T> Tuple1<E> Invalid(Validation.Invalid<E, T> invalid) { return Tuple.of(invalid.getError()); }
}

View File

@ -0,0 +1,111 @@
// @formatter:off
// CHECKSTYLE:OFF
package io.vavr;
import io.vavr.API.Match.Pattern;
import io.vavr.API.Match.Pattern0;
import io.vavr.API.Match.Pattern1;
import io.vavr.API.Match.Pattern2;
import io.vavr.API.Match.Pattern3;
import io.vavr.API.Match.Pattern4;
import io.vavr.API.Match.Pattern5;
import io.vavr.API.Match.Pattern6;
import io.vavr.API.Match.Pattern7;
import io.vavr.API.Match.Pattern8;
import io.vavr.collection.List;
import io.vavr.concurrent.Future;
import io.vavr.control.Either;
import io.vavr.control.Option;
import io.vavr.control.Try;
import io.vavr.control.Validation;
/**
* @deprecated Will be removed in the next major version, along with VAVR's pattern matching, in favor of Java's native pattern matching.
*/
@Deprecated
public final class Patterns {
private Patterns() {
}
public static final Pattern0<Tuple0> $Tuple0 = Pattern0.of(Tuple0.class);
public static <T1, _1 extends T1> Pattern1<Tuple1<T1>, _1> $Tuple1(Pattern<_1, ?> p1) {
return Pattern1.of(Tuple1.class, p1, io.vavr.$::Tuple1);
}
public static <T1, T2, _1 extends T1, _2 extends T2> Pattern2<Tuple2<T1, T2>, _1, _2> $Tuple2(Pattern<_1, ?> p1, Pattern<_2, ?> p2) {
return Pattern2.of(Tuple2.class, p1, p2, io.vavr.$::Tuple2);
}
public static <T1, T2, T3, _1 extends T1, _2 extends T2, _3 extends T3> Pattern3<Tuple3<T1, T2, T3>, _1, _2, _3> $Tuple3(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3) {
return Pattern3.of(Tuple3.class, p1, p2, p3, io.vavr.$::Tuple3);
}
public static <T1, T2, T3, T4, _1 extends T1, _2 extends T2, _3 extends T3, _4 extends T4> Pattern4<Tuple4<T1, T2, T3, T4>, _1, _2, _3, _4> $Tuple4(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3, Pattern<_4, ?> p4) {
return Pattern4.of(Tuple4.class, p1, p2, p3, p4, io.vavr.$::Tuple4);
}
public static <T1, T2, T3, T4, T5, _1 extends T1, _2 extends T2, _3 extends T3, _4 extends T4, _5 extends T5> Pattern5<Tuple5<T1, T2, T3, T4, T5>, _1, _2, _3, _4, _5> $Tuple5(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3, Pattern<_4, ?> p4, Pattern<_5, ?> p5) {
return Pattern5.of(Tuple5.class, p1, p2, p3, p4, p5, io.vavr.$::Tuple5);
}
public static <T1, T2, T3, T4, T5, T6, _1 extends T1, _2 extends T2, _3 extends T3, _4 extends T4, _5 extends T5, _6 extends T6> Pattern6<Tuple6<T1, T2, T3, T4, T5, T6>, _1, _2, _3, _4, _5, _6> $Tuple6(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3, Pattern<_4, ?> p4, Pattern<_5, ?> p5, Pattern<_6, ?> p6) {
return Pattern6.of(Tuple6.class, p1, p2, p3, p4, p5, p6, io.vavr.$::Tuple6);
}
public static <T1, T2, T3, T4, T5, T6, T7, _1 extends T1, _2 extends T2, _3 extends T3, _4 extends T4, _5 extends T5, _6 extends T6, _7 extends T7> Pattern7<Tuple7<T1, T2, T3, T4, T5, T6, T7>, _1, _2, _3, _4, _5, _6, _7> $Tuple7(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3, Pattern<_4, ?> p4, Pattern<_5, ?> p5, Pattern<_6, ?> p6, Pattern<_7, ?> p7) {
return Pattern7.of(Tuple7.class, p1, p2, p3, p4, p5, p6, p7, io.vavr.$::Tuple7);
}
public static <T1, T2, T3, T4, T5, T6, T7, T8, _1 extends T1, _2 extends T2, _3 extends T3, _4 extends T4, _5 extends T5, _6 extends T6, _7 extends T7, _8 extends T8> Pattern8<Tuple8<T1, T2, T3, T4, T5, T6, T7, T8>, _1, _2, _3, _4, _5, _6, _7, _8> $Tuple8(Pattern<_1, ?> p1, Pattern<_2, ?> p2, Pattern<_3, ?> p3, Pattern<_4, ?> p4, Pattern<_5, ?> p5, Pattern<_6, ?> p6, Pattern<_7, ?> p7, Pattern<_8, ?> p8) {
return Pattern8.of(Tuple8.class, p1, p2, p3, p4, p5, p6, p7, p8, io.vavr.$::Tuple8);
}
public static <T, _1 extends T, _2 extends List<T>> Pattern2<List.Cons<T>, _1, _2> $Cons(Pattern<_1, ?> p1, Pattern<_2, ?> p2) {
return Pattern2.of(List.Cons.class, p1, p2, io.vavr.$::Cons);
}
public static <T> Pattern0<List.Nil<T>> $Nil() {
return Pattern0.of(List.Nil.class);
}
public static <T, _1 extends Option<Try<T>>> Pattern1<Future<T>, _1> $Future(Pattern<_1, ?> p1) {
return Pattern1.of(Future.class, p1, io.vavr.$::Future);
}
public static <L, R, _1 extends R> Pattern1<Either.Right<L, R>, _1> $Right(Pattern<_1, ?> p1) {
return Pattern1.of(Either.Right.class, p1, io.vavr.$::Right);
}
public static <L, R, _1 extends L> Pattern1<Either.Left<L, R>, _1> $Left(Pattern<_1, ?> p1) {
return Pattern1.of(Either.Left.class, p1, io.vavr.$::Left);
}
public static <T, _1 extends T> Pattern1<Option.Some<T>, _1> $Some(Pattern<_1, ?> p1) {
return Pattern1.of(Option.Some.class, p1, io.vavr.$::Some);
}
public static <T> Pattern0<Option.None<T>> $None() {
return Pattern0.of(Option.None.class);
}
public static <T, _1 extends T> Pattern1<Try.Success<T>, _1> $Success(Pattern<_1, ?> p1) {
return Pattern1.of(Try.Success.class, p1, io.vavr.$::Success);
}
public static <T, _1 extends Throwable> Pattern1<Try.Failure<T>, _1> $Failure(Pattern<_1, ?> p1) {
return Pattern1.of(Try.Failure.class, p1, io.vavr.$::Failure);
}
public static <E, T, _1 extends T> Pattern1<Validation.Valid<E, T>, _1> $Valid(Pattern<_1, ?> p1) {
return Pattern1.of(Validation.Valid.class, p1, io.vavr.$::Valid);
}
public static <E, T, _1 extends E> Pattern1<Validation.Invalid<E, T>, _1> $Invalid(Pattern<_1, ?> p1) {
return Pattern1.of(Validation.Invalid.class, p1, io.vavr.$::Invalid);
}
}
// CHECKSTYLE:ON
// @formatter:on

Some files were not shown because too many files have changed in this diff Show More