- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 62 for generics (0.07 seconds)
-
generics.go
qqxhb <******@****.***> 1774092864 +0800
Created: Sun Apr 05 09:35:12 GMT 2026 - Last Modified: Sat Mar 21 11:34:24 GMT 2026 - 26K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/base/ConverterTest.java
} private static class StringWrapper { private final String value; StringWrapper(String value) { this.value = value; } } @GwtIncompatible // J2CL generics problem public void testAndThen() { Converter<StringWrapper, String> first = new Converter<StringWrapper, String>() { @Override protected String doForward(StringWrapper object) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 8.3K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java
Class<? super T> rawType = type.getRawType(); @SuppressWarnings("unchecked") // Assume all default values are generics safe. T defaultValue = (T) defaultValues.getInstance(rawType); if (defaultValue != null) { return defaultValue; } @SuppressWarnings("unchecked") // ArbitraryInstances always returns generics-safe dummies. T value = (T) ArbitraryInstances.get(rawType); if (value != null) { return value;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Apr 02 14:49:41 GMT 2026 - 32.5K bytes - Click Count (0) -
android/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 - 157.6K bytes - Click Count (0) -
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/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) -
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) -
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) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
return getDone(future); } } private static class MyException extends Exception {} // Class hierarchy for generics sanity checks private static class Foo {} private static class FooChild extends Foo {} private static class Bar {} private static class BarChild extends Bar {}
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 134K bytes - Click Count (0)