Skip to content

Commit ac2a7cd

Browse files
committed
Updating CHANGELOG
1 parent 39f79d2 commit ac2a7cd

File tree

2 files changed

+26
-9
lines changed

2 files changed

+26
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
1313
- `MergeHMaps`, a `Monoid` that merges `HMap`s by merging the values via key-specified `Semigroup`s
1414
- `Id#id` overload that accepts an argument and returns it
1515
- `MaybeT#or`, choose the first `MaybeT` that represents an effect around `just` a value
16+
- `MaybeT#filter`, filter a `Maybe` inside an effect
1617
- `StateMatcher, StateTMatcher, WriterTMatcher`
1718
- `ReaderT#and`, category composition between `ReaderT` instances: `(a -> m b) -> (b -> m c) -> (a -> m c)`
1819
- `IterateT`, [`ListT` done right](https://wiki.haskell.org/ListT_done_right)
20+
- `Comparison`, a type-safe sum of `LT`, `EQ`, and `GT` orderings
21+
- `Compare`, a function taking a `Comparator` and returning a `Comparison`
22+
- `Min/Max/...With` variants for inequality testing with a `Comparator`
1923

2024
## [5.1.0] - 2019-10-13
2125
### Changed

src/main/java/com/jnape/palatable/lambda/functions/ordering/ComparisonRelation.java

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@
1313
* @see Compare
1414
*/
1515
public abstract class ComparisonRelation
16-
implements CoProduct3<ComparisonRelation.LessThan, ComparisonRelation.Equal, ComparisonRelation.GreaterThan, ComparisonRelation> {
17-
private ComparisonRelation() { }
16+
implements CoProduct3<
17+
ComparisonRelation.LessThan,
18+
ComparisonRelation.Equal,
19+
ComparisonRelation.GreaterThan,
20+
ComparisonRelation> {
21+
22+
private ComparisonRelation() {
23+
}
1824

1925
/**
2026
* Return a comparison relation from the result of a {@link Comparator} or {@link Comparable} result
@@ -38,7 +44,7 @@ public static Equal equal() {
3844
return Equal.INSTANCE;
3945
}
4046

41-
public final static class LessThan extends ComparisonRelation {
47+
public static final class LessThan extends ComparisonRelation {
4248
private static final LessThan INSTANCE = new LessThan();
4349

4450
private LessThan() {
@@ -50,12 +56,14 @@ public String toString() {
5056
}
5157

5258
@Override
53-
public <R> R match(Fn1<? super LessThan, ? extends R> aFn, Fn1<? super Equal, ? extends R> bFn, Fn1<? super GreaterThan, ? extends R> cFn) {
59+
public <R> R match(Fn1<? super LessThan, ? extends R> aFn,
60+
Fn1<? super Equal, ? extends R> bFn,
61+
Fn1<? super GreaterThan, ? extends R> cFn) {
5462
return aFn.apply(this);
5563
}
5664
}
5765

58-
public final static class Equal extends ComparisonRelation {
66+
public static final class Equal extends ComparisonRelation {
5967
private static final Equal INSTANCE = new Equal();
6068

6169
private Equal() {
@@ -66,23 +74,28 @@ public String toString() {
6674
}
6775

6876
@Override
69-
public <R> R match(Fn1<? super LessThan, ? extends R> aFn, Fn1<? super Equal, ? extends R> bFn, Fn1<? super GreaterThan, ? extends R> cFn) {
77+
public <R> R match(Fn1<? super LessThan, ? extends R> aFn,
78+
Fn1<? super Equal, ? extends R> bFn,
79+
Fn1<? super GreaterThan, ? extends R> cFn) {
7080
return bFn.apply(this);
7181
}
7282
}
7383

74-
public final static class GreaterThan extends ComparisonRelation {
84+
public static final class GreaterThan extends ComparisonRelation {
7585
private static final GreaterThan INSTANCE = new GreaterThan();
7686

77-
private GreaterThan() { }
87+
private GreaterThan() {
88+
}
7889

7990
@Override
8091
public String toString() {
8192
return "GreaterThan";
8293
}
8394

8495
@Override
85-
public <R> R match(Fn1<? super LessThan, ? extends R> aFn, Fn1<? super Equal, ? extends R> bFn, Fn1<? super GreaterThan, ? extends R> cFn) {
96+
public <R> R match(Fn1<? super LessThan, ? extends R> aFn,
97+
Fn1<? super Equal, ? extends R> bFn,
98+
Fn1<? super GreaterThan, ? extends R> cFn) {
8699
return cFn.apply(this);
87100
}
88101
}

0 commit comments

Comments
 (0)