Skip to content

Commit

Permalink
Clarifies Traversable.min()/max() javadoc. Fixes #1304
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldietrich committed Aug 26, 2016
1 parent 434047e commit 465ca93
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions javaslang/src/main/java/javaslang/collection/Traversable.java
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,10 @@ default Option<T> lastOption() {
<U> Traversable<U> map(Function<? super T, ? extends U> mapper);

/**
* Calculates the maximum of this elements according to their natural order.
* Calculates the maximum of this elements according to the underlying element {@code Comparator} if exists,
* or the natural order of elements.
*
* @return {@code Some(maximum)} of this elements or {@code None} if this is empty or this elements are not comparable
* @return {@code Some(maximum)} of this elements or {@code None} if this is empty or no {@code Comparator} is applicable
*/
@SuppressWarnings("unchecked")
default Option<T> max() {
Expand Down Expand Up @@ -690,9 +691,10 @@ default <U extends Comparable<? super U>> Option<T> maxBy(Function<? super T, ?
}

/**
* Calculates the minimum of this elements according to their natural order.
* Calculates the minimum of this elements according to the underlying element {@code Comparator} if exists,
* or the natural order of elements.
*
* @return {@code Some(minimum)} of this elements or {@code None} if this is empty or this elements are not comparable
* @return {@code Some(minimum)} of this elements or {@code None} if this is empty or no {@code Comparator} is applicable
*/
@SuppressWarnings("unchecked")
default Option<T> min() {
Expand Down

0 comments on commit 465ca93

Please sign in to comment.