Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 36 for get (0.11 sec)

  1. src/test/java/org/codelibs/core/collection/ArrayMapTest.java

            for (int i = 0; i < num; i++) {
                hmap.get(String.valueOf(i));
            }
            System.out.println("HashMap.get:" + (System.currentTimeMillis() - start));
    
            start = System.currentTimeMillis();
            for (int i = 0; i < num; i++) {
                amap.get(String.valueOf(i));
            }
            System.out.println("ArrayMap.get:" + (System.currentTimeMillis() - start));
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/collection/LruHashMapTest.java

            lru.put("ccc", "333");
            assertThat(lru.get("aaa"), is("111"));
            Iterator<String> i = lru.keySet().iterator();
            assertThat(i.next(), is("bbb"));
            assertThat(i.next(), is("ccc"));
            assertThat(i.next(), is("aaa"));
            lru.put("ddd", "444");
            assertThat(lru.size(), is(3));
            assertThat(lru.get("bbb"), is(nullValue()));
            i = lru.keySet().iterator();
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  3. src/test/java/org/codelibs/core/beans/util/BeanUtilTest.java

            final Map<String, Object> dest = newHashMap();
            BeanUtil.copyBeanToMap(src, dest);
            assertThat(dest.get("aaa"), is((Object) "aaa"));
            assertThat(dest.get("bbb"), is(nullValue()));
            assertThat(dest.get("ccc"), is((Object) "ccc"));
            assertThat(dest.get("ddd"), is(nullValue()));
        }
    
        /**
         * @throws Exception
         */
        @Test
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 34.5K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/collection/SLinkedListTest.java

         */
        @Test
        public void testGet() throws Exception {
            list.addLast("1");
            list.addLast("2");
            list.addLast("3");
            assertThat(list.get(0), is("1"));
            assertThat(list.get(1), is("2"));
            assertThat(list.get(2), is("3"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testSerialize() throws Exception {
            list.addLast("1");
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 8.3K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/beans/impl/PropertyDescImpl.java

                assertState(readable, propertyName + " is not readable.");
                if (hasReadMethod()) {
                    return MethodUtil.invoke(readMethod, target, EMPTY_ARGS);
                }
                return FieldUtil.get(field, target);
            } catch (final Throwable t) {
                throw new IllegalPropertyRuntimeException(beanDesc.getBeanClass(), propertyName, t);
            }
        }
    
        @Override
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  6. src/test/java/org/codelibs/core/beans/util/BeanMapTest.java

        /**
         * @throws Exception
         */
        @Test
        public void testGet() throws Exception {
            final BeanMap map = new BeanMap();
            map.put("aaa", 1);
            map.put("bbb", 2);
            assertThat(map.get("aaa"), is((Object) 1));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testGet_NotContains() throws Exception {
            exception.expect(IllegalKeyOfBeanMapException.class);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/core/text/DecimalFormatSymbolsUtil.java

         */
        public static DecimalFormatSymbols getDecimalFormatSymbols(final Locale locale) {
            assertArgumentNotNull("locale", locale);
    
            DecimalFormatSymbols symbols = CACHE.get(locale);
            if (symbols == null) {
                symbols = new DecimalFormatSymbols(locale);
                CACHE.put(locale, symbols);
            }
            return symbols;
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/core/collection/CaseInsensitiveMapTest.java

        public void testGet() throws Exception {
            assertThat(map.get("ONE"), is("1"));
            assertThat(map.get("One"), is("1"));
            assertThat(map.get("hoge"), is(nullValue()));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testPut() throws Exception {
            assertThat(map.put("One", "11"), is("1"));
            assertThat(map.get("one"), is("11"));
        }
    
        /**
         * @throws Exception
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 4K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/core/stream/StreamUtilTest.java

        }
    
        public void test_ofNull() {
            assertEquals(0, (int) StreamUtil.stream().get(s -> s.toArray().length));
            Object[] o = {};
            assertEquals(0, (int) StreamUtil.stream(o).get(s -> s.toArray().length));
            Map<Object, Object> map = new HashMap<Object, Object>();
            assertEquals(0, (int) StreamUtil.stream(map).get(s -> s.toArray().length));
        }
    
        public void test_ofMap() {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/beans/util/BeanMap.java

    /**
     * Stringがキーで、存在しないキーにアクセスする(get)と例外を投げるマップです。
     *
     * @author higa
     */
    public class BeanMap extends LinkedHashMap<String, Object> {
    
        private static final long serialVersionUID = 1;
    
        @Override
        public Object get(final Object key) {
            if (!containsKey(key)) {
                throw new IllegalKeyOfBeanMapException(key, this);
            }
            return super.get(key);
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.2K bytes
    - Viewed (0)
Back to top