Skip to content

Commit 1c6637f

Browse files
Updated docs to Vavr 0.9.0
1 parent 2e947f2 commit 1c6637f

19 files changed

+201
-215
lines changed

README.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
= Javaslang Documentation
1+
= Vavr Documentation
22

3-
This is the source of the http://docs.javaslang.io/[Javaslang documentation].
3+
This is the source of the http://docs.vavr.io/[Vavr documentation].
44

55
=== Performing Updates
66

@@ -10,5 +10,5 @@ This is the source of the http://docs.javaslang.io/[Javaslang documentation].
1010
githubPassword=<GitHub password>
1111

1212
* Update the version in `gradle.properties`. Please note that the version in the Maven section of `getting_started.adoc` currently has to be updated manually.
13-
* Write documentation and test results with `./gradlew asciidoc`. If the Javaslang API has changed, some code example tests might fail.
13+
* Write documentation and test results with `./gradlew asciidoc`. If the Vavr API has changed, some code example tests might fail.
1414
* Then `git commit`, `git push` and `./gradlew publishGhPages`

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repositories {
2828
}
2929

3030
dependencies {
31-
testCompile "io.javaslang:javaslang:${project.version}"
31+
testCompile "io.vavr:vavr:${project.version}"
3232
testCompile "junit:junit:4.11"
3333
testCompile "org.assertj:assertj-core:3.0.0"
3434
testCompile "ch.qos.logback:logback-classic:0.9.26"
@@ -73,7 +73,7 @@ copyCNAME.dependsOn asciidoctor
7373
publishGhPages.dependsOn copyCNAME
7474

7575
githubPages {
76-
repoUri = 'https://github.com/javaslang/javaslang-docs.git'
76+
repoUri = 'https://github.com/vavr-io/vavr-docs.git'
7777

7878
credentials {
7979
username = project.githubUser

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ gradleGitVersion=1.3.2
44
gradleWatchPluginVersion=0.1.5
55
livereloadGradlePluginVersion=0.2.1
66

7-
description = Javaslang Documentation
8-
version = 2.0.5
9-
group = io.javaslang
7+
description = Vavr Documentation
8+
version = 0.9.0
9+
group = io.vavr

src/docs/asciidoc/getting_started.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
== Getting started
22

3-
Projects that include Javaslang need to target Java 1.8 at minimum.
3+
Projects that include Vavr need to target Java 1.8 at minimum.
44

5-
The .jar is available at http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22javaslang%22%20g%3A%22io.javaslang%22[Maven Central].
5+
The .jar is available at http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.vavr%22%20a%3A%22vavr%22[Maven Central].
66

77
=== Gradle
88

99
[source,groovy]
1010
[subs="attributes"]
1111
----
1212
dependencies {
13-
compile "io.javaslang:javaslang:{project-version}"
13+
compile "io.vavr:vavr:{project-version}"
1414
}
1515
----
1616

@@ -20,20 +20,20 @@ dependencies {
2020
----
2121
<dependencies>
2222
<dependency>
23-
<groupId>io.javaslang</groupId>
24-
<artifactId>javaslang</artifactId>
25-
<version>2.0.5</version>
23+
<groupId>io.vavr</groupId>
24+
<artifactId>vavr</artifactId>
25+
<version>0.9.0</version>
2626
</dependency>
2727
</dependencies>
2828
----
2929

3030
=== Standalone
3131

32-
Because Javaslang does __not__ depend on any libraries (other than the JVM) you can easily add it as standalone .jar to your classpath.
32+
Because Vavr does __not__ depend on any libraries (other than the JVM) you can easily add it as standalone .jar to your classpath.
3333

3434
=== Snapshots
3535

36-
Developer versions can be found https://oss.sonatype.org/content/repositories/snapshots/io/javaslang/javaslang[here].
36+
Developer versions can be found https://oss.sonatype.org/content/repositories/snapshots/io/vavr/vavr[here].
3737

3838
==== Gradle
3939

src/docs/asciidoc/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
= Javaslang User Guide
1+
= Vavr User Guide
22
Daniel Dietrich, Robert Winkler
33
:toc: left
44
:toclevels: 3

src/docs/asciidoc/introduction.adoc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
== Introduction
22

3-
Javaslang is a functional library for Java 8+ that provides persistent data types and functional control structures.
3+
Vavr is a functional library for Java 8+ that provides persistent data types and functional control structures.
44

5-
=== Functional Data Structures in Java 8 with Javaslang
5+
=== Functional Data Structures in Java 8 with Vavr
66

77
Java 8’s https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html[lambdas (λ)] empower us to create wonderful API’s. They incredibly increase the expressiveness of the language.
88

9-
http://javaslang.io/[Javaslang] leveraged lambdas to create various new features based on functional patterns. One of them is a functional collection library that is intended to be a replacement for Java’s standard collections.
9+
http://vavr.io/[Vavr] leveraged lambdas to create various new features based on functional patterns. One of them is a functional collection library that is intended to be a replacement for Java’s standard collections.
1010

11-
image::images/javaslang-collections.png[Javaslang Collections]
11+
image::images/vavr-collections.png[Vavr Collections]
1212

1313
__(This is just a bird’s view, you will find a human-readable version below.)__
1414

1515
=== Functional Programming
1616

17-
Before we deep-dive into the details about the data structures I want to talk about some basics. This will make it clear why I created Javaslang and specifically new Java collections.
17+
Before we deep-dive into the details about the data structures I want to talk about some basics. This will make it clear why I created Vavr and specifically new Java collections.
1818

1919
==== Side-Effects
2020

@@ -70,11 +70,11 @@ Rich Hickey, the creator of Clojure, gave a great talk about https://www.youtube
7070
* behave type-safe when used in unchecked covariant casts (Java-specific)
7171
The key to a better Java is to use __immutable values__ paired with __referentially transparent functions__.
7272

73-
Javaslang provides the necessary http://static.javadoc.io/io.javaslang/javaslang/2.0.0/javaslang/control/package-summary.html[controls] and http://static.javadoc.io/io.javaslang/javaslang/2.0.0/javaslang/collection/package-summary.html[collections] to accomplish this goal in every-day Java programming.
73+
Vavr provides the necessary http://static.javadoc.io/io.vavr/vavr/0.9.0/io/vavr/control/package-summary.html[controls] and https://static.javadoc.io/io.vavr/vavr/0.9.0/io/vavr/collection/package-summary.html[collections] to accomplish this goal in every-day Java programming.
7474

7575
=== Data Structures in a Nutshell
7676

77-
Javaslang’s collection library comprises of a rich set of functional data structures built on top of lambdas. The only interface they share with Java’s original collections is Iterable. The main reason is that the mutator methods of Java’s collection interfaces do not return an object of the underlying collection type.
77+
Vavr’s collection library comprises of a rich set of functional data structures built on top of lambdas. The only interface they share with Java’s original collections is Iterable. The main reason is that the mutator methods of Java’s collection interfaces do not return an object of the underlying collection type.
7878

7979
We will see why this is so essential by taking a look at the different types of data structures.
8080

@@ -120,13 +120,13 @@ This model does not impose any implementation details. Here come functional data
120120

121121
Also known as https://en.wikipedia.org/wiki/Purely_functional[__purely__ functional data structures], these are __immutable__ and __persistent__. The methods of functional data structures are __referentially transparent__.
122122

123-
Javaslang features a wide range of the most-commonly used functional data structures. The following examples are explained in-depth.
123+
Vavr features a wide range of the most-commonly used functional data structures. The following examples are explained in-depth.
124124

125125
==== Linked List
126126

127127
One of the most popular and also simplest functional data structures is the https://en.wikipedia.org/wiki/Linked_list[(singly) linked List]. It has a __head__ element and a __tail__ List. A linked List behaves like a Stack which follows the https://en.wikipedia.org/wiki/Stack_(abstract_data_type)[last in, first out (LIFO)] method.
128128

129-
In http://javaslang.io/[Javaslang] we instantiate a List like this:
129+
In http://vavr.io/[Vavr] we instantiate a List like this:
130130

131131
[source,java]
132132
----
@@ -150,9 +150,9 @@ The new head element 0 is __linked__ to the tail of the original List. The origi
150150

151151
image::images/list2.png?w=660[List 2]
152152

153-
These operations take place in constant time, in other words they are independent of the List size. Most of the other operations take linear time. In Javaslang this is expressed by the interface LinearSeq, which we may already know from Scala.
153+
These operations take place in constant time, in other words they are independent of the List size. Most of the other operations take linear time. In Vavr this is expressed by the interface LinearSeq, which we may already know from Scala.
154154

155-
If we need data structures that are queryable in constant time, Javaslang offers Array and Vector. Both have https://en.wikipedia.org/wiki/Random_access[random access] capabilities.
155+
If we need data structures that are queryable in constant time, Vavr offers Array and Vector. Both have https://en.wikipedia.org/wiki/Random_access[random access] capabilities.
156156

157157
The Array type is backed by a Java array of objects. Insert and remove operations take linear time. Vector is in-between Array and List. It performs well in both areas, random access and modification.
158158

@@ -256,7 +256,7 @@ image::images/binarytree2.png?w=660[Binary Tree 2]
256256

257257
In order to maintain the performance characteristics of a binary search tree it needs to be kept balanced. All paths from the root to a leaf need to have roughly the same length.
258258

259-
In Javaslang we implemented a binary search tree based on a https://en.wikipedia.org/wiki/Red%E2%80%93black_tree[Red/Black Tree]. It uses a specific coloring strategy to keep the tree balanced on inserts and deletes. To read more about this topic please refer to the book http://www.amazon.com/Purely-Functional-Structures-Chris-Okasaki/dp/0521663504[Purely Functional Data Structures] by Chris Okasaki.
259+
In Vavr we implemented a binary search tree based on a https://en.wikipedia.org/wiki/Red%E2%80%93black_tree[Red/Black Tree]. It uses a specific coloring strategy to keep the tree balanced on inserts and deletes. To read more about this topic please refer to the book http://www.amazon.com/Purely-Functional-Structures-Chris-Okasaki/dp/0521663504[Purely Functional Data Structures] by Chris Okasaki.
260260

261261
=== State of the Collections
262262

@@ -285,15 +285,15 @@ Arrays.asList(1, 2, 3)
285285
.collect(Collectors.toList())
286286
----
287287

288-
Javaslang is greatly inspired by Scala. This is how the above example should have been in Java 8.
288+
Vavr is greatly inspired by Scala. This is how the above example should have been in Java 8.
289289

290290
[source,java]
291291
----
292-
// = Stream("1", "2", "3") in Javaslang
292+
// = Stream("1", "2", "3") in Vavr
293293
Stream.of(1, 2, 3).map(Object::toString)
294294
----
295295

296-
Within the last year we put much effort into implementing the Javaslang collection library. It comprises the most widely used collection types.
296+
Within the last year we put much effort into implementing the Vavr collection library. It comprises the most widely used collection types.
297297

298298
==== Seq
299299

@@ -335,7 +335,7 @@ String join(String... words) {
335335
}
336336
----
337337

338-
The Javaslang collections provide us with many functions to operate on the underlying elements. This allows us to express things in a very concise way.
338+
The Vavr collections provide us with many functions to operate on the underlying elements. This allows us to express things in a very concise way.
339339

340340
[source,java]
341341
----
@@ -346,7 +346,7 @@ String join(String... words) {
346346
}
347347
----
348348

349-
Most goals can be accomplished in various ways using Javaslang. Here we reduced the whole method body to fluent function calls on a List instance. We could even remove the whole method and directly use our List to obtain the computation result.
349+
Most goals can be accomplished in various ways using Vavr. Here we reduced the whole method body to fluent function calls on a List instance. We could even remove the whole method and directly use our List to obtain the computation result.
350350

351351
[source,java]
352352
----
@@ -365,7 +365,7 @@ We described how to model sorted Sets with binary tree structures. A sorted Map
365365

366366
The HashMap implementation is backed by a http://lampwww.epfl.ch/papers/idealhashtrees.pdf[Hash Array Mapped Trie (HAMT)]. Accordingly the HashSet is backed by a HAMT containing key-key pairs.
367367

368-
Our Map does __not__ have a special Entry type to represent key-value pairs. Instead we use Tuple2 which is already part of Javaslang. The fields of a Tuple are enumerated.
368+
Our Map does __not__ have a special Entry type to represent key-value pairs. Instead we use Tuple2 which is already part of Vavr. The fields of a Tuple are enumerated.
369369

370370
[source,java]
371371
----
@@ -376,7 +376,7 @@ Integer key = entry._1;
376376
String value = entry._2;
377377
----
378378

379-
Maps and Tuples are used throughout Javaslang. Tuples are inevitable to handle multi-valued return types in a general way.
379+
Maps and Tuples are used throughout Vavr. Tuples are inevitable to handle multi-valued return types in a general way.
380380

381381
[source,java]
382382
----
@@ -387,4 +387,4 @@ List.of(1, 2, 3, 4).groupBy(i -> i % 2);
387387
List.of('a', 'b', 'c').zipWithIndex();
388388
----
389389

390-
At Javaslang, we explore and test our library by implementing the https://projecteuler.net/archives[99 Euler Problems]. It is a great proof of concept. Please don’t hesitate to send pull requests.
390+
At Vavr, we explore and test our library by implementing the https://projecteuler.net/archives[99 Euler Problems]. It is a great proof of concept. Please don’t hesitate to send pull requests.

src/docs/asciidoc/license.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
== License
22

3-
Copyright 2014-2016 Javaslang, http://javaslang.io
3+
Copyright 2014-2016 Vavr, http://vavr.io
44

55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)