Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b36173 commit 8552888Copy full SHA for 8552888
lang/src/main/java/com/ricequant/rqboot/lang/TypeHelper.java
@@ -0,0 +1,30 @@
1
+package com.ricequant.rqboot.lang;
2
+
3
+import java.util.Collection;
4
+import java.util.List;
5
6
+/**
7
+ * @author kangol
8
+ */
9
+public class TypeHelper {
10
11
+ public static <T> List<T> conv(List<?> in) {
12
+ return (List<T>) in;
13
+ }
14
15
+ public static <T> T[] conv(Object[] in) {
16
+ return (T[]) in;
17
18
19
+ public static <T> T conv(Object in) {
20
+ return (T) in;
21
22
23
+ public static <T> T conv(Object in, Class<T> clazz) {
24
25
26
27
+ public static <T> Collection<T> conv(Collection<?> in) {
28
+ return (Collection<T>) in;
29
30
+}
0 commit comments