Skip to content

Commit

Permalink
release 01.00.04-RPM
Browse files Browse the repository at this point in the history
  • Loading branch information
svenruppert committed Sep 5, 2019
1 parent 832d8c3 commit 7e72741
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 39 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ This release we will increase test coverage and documentation.
The basic structures and functions are in production used since longer time.
Adding Apache Lic header to all files

* Transformations
* static <T> Function<Iterator<T>, Stream<T>> iteratorToStream()


## 01.00.03-RPM
* added JitCI for deployment as well
* version updates
Expand Down
2 changes: 1 addition & 1 deletion docker_compile_locale.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ docker run \
--name compile \
-v "$(pwd)":/usr/src/mymaven \
-w /usr/src/mymaven \
svenruppert/maven-3.6-jdk-08 \
svenruppert/maven-3.6.1-adopt:1.8.212-04 \
mvn clean install
3 changes: 2 additions & 1 deletion docker_compile_locale_with_nexus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
#



docker run \
--rm \
--name compile \
-v "$(pwd)/_data/nexus/settings.xml":/root/.m2/settings.xml \
-v "$(pwd)":/usr/src/mymaven \
-w /usr/src/mymaven \
svenruppert/maven-3.6-jdk-08 \
svenruppert/maven-3.6.1-adopt:1.8.212-04 \
mvn clean install
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<groupId>org.rapidpm</groupId>
<artifactId>rapidpm-functional-reactive</artifactId>
<version>01.00.04-RPM-SNAPSHOT</version>
<version>01.00.04-RPM</version>

<inceptionYear>2017</inceptionYear>
<organization>
Expand Down Expand Up @@ -80,16 +80,16 @@
<log4j-api.version>2.11.1</log4j-api.version>

<!--<jacoco.version>0.8.2</jacoco.version>-->
<pitest.version>1.4.7</pitest.version>
<pitest-junit5-plugin.version>0.8</pitest-junit5-plugin.version>
<pitest.version>1.4.10</pitest.version>
<pitest-junit5-plugin.version>0.9</pitest-junit5-plugin.version>
<pitest-prod-classes>org.rapidpm.*</pitest-prod-classes>
<pitest-test-classes>junit.org.rapidpm*</pitest-test-classes>

<jmh.version>1.21</jmh.version>

<!--TDD jUnit5-->
<junit.jupiter.version>5.5.0-M1</junit.jupiter.version>
<junit.platform.version>1.5.0-M1</junit.platform.version>
<junit.jupiter.version>5.5.1</junit.jupiter.version>
<junit.platform.version>1.5.1</junit.platform.version>
</properties>

<repositories>
Expand Down
70 changes: 39 additions & 31 deletions src/main/java/org/rapidpm/frp/Transformations.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/**
* Copyright © 2017 Sven Ruppert ([email protected])
*
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -59,26 +59,36 @@ static <T, U, V> Function<Function<U, V>, Function<Function<T, U>, Function<T, V
return (Function<U, V> f) -> (Function<T, U> g) -> (T x) -> f.apply(g.apply(x));
}


/**
* <p>enumToStream.</p>
*
* @param <T> a T object.
* @return a {@link java.util.function.Function} object.
*/
static <T> Function<Enumeration<T>, Stream<T>> enumToStream() {
return (e) ->
StreamSupport
.stream(Spliterators.spliteratorUnknownSize(new Iterator<T>() {
public T next() {
return e.nextElement();
}

public boolean hasNext() {
return e.hasMoreElements();
}
}, Spliterator.ORDERED), false);
return (e) -> StreamSupport.stream(Spliterators.spliteratorUnknownSize(new Iterator<T>() {
public T next() {
return e.nextElement();
}

public boolean hasNext() {
return e.hasMoreElements();
}
}, Spliterator.ORDERED), false);
}

static <T> Function<Iterator<T>, Stream<T>> iteratorToStream() {
return (e) -> StreamSupport.stream(Spliterators.spliteratorUnknownSize(new Iterator<T>() {
public T next() {
return e.next();
}

public boolean hasNext() {
return e.hasNext();
}
}, Spliterator.ORDERED), false);
}

/**
* <p>curryBiFunction.</p>
Expand Down Expand Up @@ -113,7 +123,8 @@ static <A, B, R> Function<CheckedBiFunction<A, B, R>, Function<A, CheckedFunctio
* @return a {@link java.util.function.Function} object.
*/
static <A, B, R> Function<Function<A, Function<B, R>>, BiFunction<A, B, R>> unCurryBiFunction() {
return (func) -> (a, b) -> func.apply(a).apply(b);
return (func) -> (a, b) -> func.apply(a)
.apply(b);
}

/**
Expand All @@ -125,7 +136,8 @@ static <A, B, R> Function<Function<A, Function<B, R>>, BiFunction<A, B, R>> unCu
* @return a {@link java.util.function.Function} object.
*/
static <A, B, R> Function<Function<A, CheckedFunction<B, R>>, CheckedBiFunction<A, B, R>> unCurryCheckedBiFunction() {
return (func) -> (a, b) -> func.apply(a).applyWithException(b);
return (func) -> (a, b) -> func.apply(a)
.applyWithException(b);
}

/**
Expand All @@ -137,9 +149,7 @@ static <A, B, R> Function<Function<A, CheckedFunction<B, R>>, CheckedBiFunction<
* @param <R> a R object.
* @return a {@link java.util.function.Function} object.
*/
static <A, B, C, R> Function<
TriFunction<A, B, C, R>,
Function<A, Function<B, Function<C, R>>>> curryTriFunction() {
static <A, B, C, R> Function<TriFunction<A, B, C, R>, Function<A, Function<B, Function<C, R>>>> curryTriFunction() {
return (func) -> a -> b -> c -> func.apply(a, b, c);
}

Expand All @@ -152,9 +162,7 @@ Function<A, Function<B, Function<C, R>>>> curryTriFunction() {
* @param <R> a R object.
* @return a {@link java.util.function.Function} object.
*/
static <A, B, C, R> Function<
CheckedTriFunction<A, B, C, R>,
Function<A, Function<B, CheckedFunction<C, R>>>> curryCheckedTriFunction() {
static <A, B, C, R> Function<CheckedTriFunction<A, B, C, R>, Function<A, Function<B, CheckedFunction<C, R>>>> curryCheckedTriFunction() {
return (func) -> a -> b -> c -> func.applyWithException(a, b, c);
}

Expand All @@ -167,10 +175,10 @@ Function<A, Function<B, CheckedFunction<C, R>>>> curryCheckedTriFunction() {
* @param <R> a R object.
* @return a {@link java.util.function.Function} object.
*/
static <A, B, C, R> Function<
Function<A, Function<B, Function<C, R>>>,
TriFunction<A, B, C, R>> unCurryTriFunction() {
return (func) -> (a, b, c) -> func.apply(a).apply(b).apply(c);
static <A, B, C, R> Function<Function<A, Function<B, Function<C, R>>>, TriFunction<A, B, C, R>> unCurryTriFunction() {
return (func) -> (a, b, c) -> func.apply(a)
.apply(b)
.apply(c);
}


Expand All @@ -183,10 +191,10 @@ TriFunction<A, B, C, R>> unCurryTriFunction() {
* @param <R> a R object.
* @return a {@link java.util.function.Function} object.
*/
static <A, B, C, R> Function<
Function<A, Function<B, CheckedFunction<C, R>>>,
CheckedTriFunction<A, B, C, R>> unCurryCheckedTriFunction() {
return (func) -> (a, b, c) -> func.apply(a).apply(b).applyWithException(c);
static <A, B, C, R> Function<Function<A, Function<B, CheckedFunction<C, R>>>, CheckedTriFunction<A, B, C, R>> unCurryCheckedTriFunction() {
return (func) -> (a, b, c) -> func.apply(a)
.apply(b)
.applyWithException(c);
}


Expand Down
3 changes: 2 additions & 1 deletion src/test/java/junit/org/rapidpm/frp/model/QuintTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public class QuintTest {
public void testEquals() {
final Quint quint = new Quint(0, 1, 2, 3, 4);

assertTrue(quint.equals(quint));
// assertTrue(quint.equals(quint));
assertEquals(quint, quint);
assertFalse(quint.equals(null));
assertFalse(quint.equals(new Quint(null, 1, 2, 3, 4)));
assertFalse(quint.equals(new Quint(0, null, 2, 3, 4)));
Expand Down

0 comments on commit 7e72741

Please sign in to comment.