Skip to content

Commit a0775da

Browse files
committed
Update README.md.
1 parent 4d889bc commit a0775da

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,40 +1029,30 @@ The `Collections` class provides a set of static utility methods for declarative
10291029

10301030
```java
10311031
public static <E> List<E> listOf(E... elements) { ... }
1032-
public static <E> List<E> listOf(Iterable<? extends E> elements) { ... }
10331032
public static <E> List<E> immutableListOf(E... elements) { ... }
1034-
public static <E> List<E> immutableListOf(Iterable<? extends E> elements) { ... }
1035-
10361033
public static <E> List<E> emptyListOf(Class<E> elementType) { ... }
10371034

10381035
public static <E extends Comparable<? super E>> List<E> sortedListOf(E... elements) { ... }
1039-
public static <E extends Comparable<? super E>> List<E> sortedListOf(Iterable<? extends E> elements) { ... }
10401036
```
10411037

10421038
```java
10431039
public static <K, V> Map<K, V> mapOf(Map.Entry<K, V>... entries) { ... }
1044-
public static <K, V> Map<K, V> mapOf(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) { ... }
10451040
public static <K, V> Map<K, V> immutableMapOf(Map.Entry<K, V>... entries) { ... }
1046-
public static <K, V> Map<K, V> immutableMapOf(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) { ... }
1047-
10481041
public static <K, V> Map<K, V> emptyMapOf(Class<K> keyType, Class<V> valueType) { ... }
10491042

10501043
public static <K extends Comparable<? super K>, V> SortedMap<K, V> sortedMapOf(Map.Entry<K, V>... entries) { ... }
1051-
public static <K extends Comparable<? super K>, V> SortedMap<K, V> sortedMapOf(Iterable<? extends Map.Entry<? extends K, ? extends V>> entries) { ... }
10521044
```
10531045

10541046
```java
10551047
public static <E> Set<E> setOf(E... elements) { ... }
1056-
public static <E> Set<E> setOf(Iterable<? extends E> elements) { ... }
10571048
public static <E> Set<E> immutableSetOf(E... elements) { ... }
1058-
public static <E> Set<E> immutableSetOf(Iterable<? extends E> elements) { ... }
1059-
10601049
public static <E> Set<E> emptySetOf(Class<E> elementType) { ... }
10611050

10621051
public static <E extends Comparable<? super E>> SortedSet<E> sortedSetOf(E... elements) { ... }
1063-
public static <E extends Comparable<? super E>> SortedSet<E> sortedSetOf(Iterable<? extends E> elements) { ... }
10641052
```
10651053

1054+
Variants that accept an `Iterable` are also provided.
1055+
10661056
This method can be used to declare map entries:
10671057

10681058
```java

0 commit comments

Comments
 (0)