Skip to content

Commit

Permalink
Fix a comment to reflect that the ImmutableSortedMap copyOf method us…
Browse files Browse the repository at this point in the history
…es the natural ordering of the keys, rather than a provided comparator.

PiperOrigin-RevId: 350137044
  • Loading branch information
java-team-github-bot authored and Google Java Core Libraries committed Jan 5, 2021
1 parent 40c590b commit b27cf09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -187,8 +187,8 @@ public static <K, V> ImmutableSortedMap<K, V> copyOf(
}

/**
* Returns an immutable map containing the given entries, with keys sorted by the provided
* comparator.
* Returns an immutable map containing the given entries, with keys sorted by their natural
* ordering.
*
* <p>This method is not type-safe, as it may be called on a map with keys that are not mutually
* comparable.
Expand Down
4 changes: 2 additions & 2 deletions guava/src/com/google/common/collect/ImmutableSortedMap.java
Expand Up @@ -232,8 +232,8 @@ public static <K, V> ImmutableSortedMap<K, V> copyOf(
}

/**
* Returns an immutable map containing the given entries, with keys sorted by the provided
* comparator.
* Returns an immutable map containing the given entries, with keys sorted by their natural
* ordering.
*
* <p>This method is not type-safe, as it may be called on a map with keys that are not mutually
* comparable.
Expand Down

0 comments on commit b27cf09

Please sign in to comment.