Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for clone (0.15 sec)

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

        /**
         * @throws Exception
         */
        @Test
        public void testEqaulas() throws Exception {
            @SuppressWarnings("unchecked")
            Map<String, String> copy = (ArrayMap<String, String>) map.clone();
            assertThat(map.equals(copy), is(true));
            assertThat(map.equals(null), is(not(true)));
            map.put("3", "test3");
            assertThat(map.equals(copy), is(not(true)));
        }
    
        /**
    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/main/java/org/codelibs/core/collection/SLinkedList.java

            header.next = header;
            header.previous = header;
            for (int i = 0; i < size; i++) {
                addLast((E) s.readObject());
            }
        }
    
        @Override
        public Object clone() {
            final SLinkedList<E> copy = new SLinkedList<>();
            for (Entry e = header.next; e != header; e = e.next) {
                copy.addLast(e.element);
            }
            return copy;
        }
    
        /**
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 11K bytes
    - Viewed (1)
  3. src/main/java/org/codelibs/core/collection/ArrayMap.java

                final K key = (K) in.readObject();
                final V value = (V) in.readObject();
                put(key, value);
            }
        }
    
        @Override
        public Object clone() {
            final ArrayMap<K, V> copy = new ArrayMap<>();
            copy.threshold = threshold;
            copy.mapTable = Arrays.copyOf(mapTable, size);
            copy.listTable = Arrays.copyOf(listTable, size);
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 20.6K bytes
    - Viewed (1)
  4. src/test/java/org/codelibs/core/io/InputStreamUtilTest.java

            try {
                assertNotNull("1", InputStreamUtil.getBytes(is));
            } finally {
                is.close();
            }
        }
    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)
  5. src/main/java/org/codelibs/core/io/Traverser.java

         * </p>
         *
         * @param handler
         *            リソースを処理するハンドラ
         */
        void forEach(ResourceHandler handler);
    
        /**
         * リソースの後処理を行います。
         */
        void close();
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/sql/StatementUtil.java

         * <p>
         * {@link Statement#close()}が例外をスローした場合はログにエラーメッセージを出力します。 例外は再スローされません。
         * </p>
         *
         * @param statement
         *            {@link Statement}
         * @see Statement#close()
         */
        public static void close(final Statement statement) {
            if (statement == null) {
                return;
            }
            try {
                statement.close();
            } catch (final SQLException e) {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/core/io/CloseableUtilTest.java

            CloseableUtil.close(out);
        }
    
        private static class NotifyOutputStream extends OutputStream {
            private String notify_;
    
            @Override
            public void write(final int arg0) throws IOException {
            }
    
            @Override
            public void close() throws IOException {
                super.close();
                notify_ = "closed";
            }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/core/io/CloseableUtil.java

         * <p>
         * {@link Closeable#close()}が例外をスローした場合はログにエラーメッセージを出力します。
         * 例外は再スローされません。これは、次のような状況で元の例外が失われるのを防ぐためです。
         * </p>
         *
         * <pre>
         * InputStream is = ...;
         * try {
         *   is.read(...);
         * } finaly {
         *   close(is);
         * }
         * </pre>
         * <p>
         * {@literal try}ブロックで例外が発生した場合、{@literal finally}ブロックの
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/core/io/ResourceTraversalTest.java

                    }
                    assertThat(path1, is(notNullValue()));
                    assertThat(is, is(notNullValue()));
                    count++;
                } finally {
                    CloseableUtil.close(is);
                }
            });
            assertTrue(count > 0);
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testForEachJarFile() throws Exception {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 6K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/io/CopyUtil.java

                try {
                    return copyInternal(is, os);
                } finally {
                    CloseableUtil.close(os);
                }
            } finally {
                CloseableUtil.close(is);
            }
        }
    
        /**
         * 指定されたエンコーディングのファイルからプラットフォームデフォルトエンコーディングのファイルへコピーします。
         *
         * @param in
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 52.4K bytes
    - Viewed (0)
Back to top