Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getElementTypeOfSet (0.09 sec)

  1. src/test/java/org/codelibs/core/lang/GenericsUtilTest.java

            assertThat(GenericsUtil.getElementTypeOfSet(t1), is(sameClass(String.class)));
    
            final Method m2 = SetType.class.getMethod("setOfClass");
            final Type t2 = m2.getGenericReturnType();
            assertThat(GenericsUtil.isTypeOf(t2, Set.class), is(true));
            assertThat(GenericsUtil.isTypeOf(GenericsUtil.getElementTypeOfSet(t2), Class.class), is(true));
    
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/lang/GenericsUtil.java

         * </p>
         *
         * @param type
         *            パラメータ化された{@link Set}
         * @return パラメータ化された{@link Set}の要素型
         */
        public static Type getElementTypeOfSet(final Type type) {
            if (!isTypeOf(type, Set.class)) {
                return null;
            }
            return getGenericParameter(type, 0);
        }
    
        /**
         * パラメータ化された{@link Map}のキーの型を返します。
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 23.6K bytes
    - Viewed (0)
Back to top