- Sort Score
- Num 10 results
- Language All
Results 31 - 40 of 491 for generics (0.08 seconds)
-
android/guava/src/com/google/common/collect/TreeMultiset.java
* * <p>The type specification is {@code <E extends Comparable>}, instead of the more specific * {@code <E extends Comparable<? super E>>}, to support classes defined without generics. */ @SuppressWarnings("rawtypes") // https://github.com/google/guava/issues/989 public static <E extends Comparable> TreeMultiset<E> create() { return new TreeMultiset<>(Ordering.natural()); } /**Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 13:11:08 GMT 2026 - 34K bytes - Click Count (0) -
guava/src/com/google/common/collect/Comparators.java
* {@code [1]} and {@code [1, 1]}). */ // Note: 90% of the time we don't add type parameters or wildcards that serve only to "tweak" the // desired return type. However, *nested* generics introduce a special class of problems that we // think tip it over into being worthwhile. public static <T extends @Nullable Object, S extends T> Comparator<Iterable<S>> lexicographical( Comparator<T> comparator) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 19:19:10 GMT 2026 - 10.9K bytes - Click Count (0) -
guava/src/com/google/common/collect/Maps.java
* <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated. Instead, * use the {@code HashMap} constructor directly, taking advantage of <a * href="https://docs.oracle.com/javase/tutorial/java/generics/genTypeInference.html#type-inference-instantiation">"diamond" * syntax</a>. * * @return a new, empty {@code HashMap} */ @SuppressWarnings("NonApiType") // acts as a direct substitute for a constructor callCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Apr 01 17:27:13 GMT 2026 - 163.4K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Comparators.java
* {@code [1]} and {@code [1, 1]}). */ // Note: 90% of the time we don't add type parameters or wildcards that serve only to "tweak" the // desired return type. However, *nested* generics introduce a special class of problems that we // think tip it over into being worthwhile. public static <T extends @Nullable Object, S extends T> Comparator<Iterable<S>> lexicographical( Comparator<T> comparator) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 19:19:10 GMT 2026 - 11.5K bytes - Click Count (0) -
guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
* used; or if the class exposes a public parameter-less constructor then it will be "new"d and * returned. * * <p>All default instances returned by {@link #get} are generics-safe. Clients won't get type * errors for using {@code get(Comparator.class)} as a {@code Comparator<Foo>}, for example. * Immutable empty instances are returned for collection types; {@code ""} for string; {@code 0} for
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Sep 23 17:50:58 GMT 2025 - 21.4K bytes - Click Count (0) -
guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableMap.java
checkNotNull(entry.getValue()); } @SuppressWarnings({"unchecked", "rawtypes"}) // immutable collections are safe for covariant casts // and getting the generics right for EnumMap is difficult to impossible ImmutableMap<K, V> result = ImmutableEnumMap.asImmutable(new EnumMap(enumMap)); return result; } int size = map.size(); switch (size) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 15:51:42 GMT 2026 - 17.2K bytes - Click Count (0) -
docs/zh-hant/docs/python-types.md
```python from typing import Any def some_function(data: Any): print(data) ``` ### 泛型(Generic types) { #generic-types } 有些型別可以在方括號中接收「型別參數」,以定義其內部元素的型別,例如「字串的 list」可以宣告為 `list[str]`。 這些能接收型別參數的型別稱為「泛型(Generic types)」或「Generics」。 你可以將相同的內建型別用作泛型(使用方括號並在裡面放型別): * `list` * `tuple` * `set` * `dict` #### List { #list }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 10.7K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
* used; or if the class exposes a public parameter-less constructor then it will be "new"d and * returned. * * <p>All default instances returned by {@link #get} are generics-safe. Clients won't get type * errors for using {@code get(Comparator.class)} as a {@code Comparator<Foo>}, for example. * Immutable empty instances are returned for collection types; {@code ""} for string; {@code 0} for
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Sep 23 17:50:58 GMT 2025 - 20.9K bytes - Click Count (0) -
CONTRIBUTING.md
> be automatically configured to add the correct license header to new source > files based on the source location. ### Type-checking, generics and casting You should try to write code that does not require suppressing any warnings from the compiler, e.g. suppressing type-checking, raw generics, and so on. However, this isn't always possible or practical. In such cases, you should use the
Created: Wed Apr 08 16:19:15 GMT 2026 - Last Modified: Wed Sep 01 07:32:01 GMT 2021 - 36.5K bytes - Click Count (0) -
docs/zh/docs/python-types.md
```python from typing import Any def some_function(data: Any): print(data) ``` ### 泛型类型 { #generic-types } 有些类型可以在方括号中接收“类型参数”(type parameters),用于声明其内部值的类型。比如“字符串列表”可以写为 `list[str]`。 这些能接收类型参数的类型称为“泛型类型”(Generic types)或“泛型”(Generics)。 你可以把相同的内建类型作为泛型使用(带方括号和内部类型): * `list` * `tuple` * `set` * `dict` #### 列表 { #list }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 10.6K bytes - Click Count (0)