Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/main/java/org/codelibs/core/collection/SingleValueIterator.java

         *            反復子が返す唯一の値
         * @return {@link SingleValueIterator}をラップした{@link Iterable}
         */
        public static <E> Iterable<E> iterable(final E value) {
            return () -> new SingleValueIterator<>(value);
        }
    
        /**
         * インスタンスを構築します。
         *
         * @param value
         *            反復子が返す唯一の値
         */
        public SingleValueIterator(final E value) {
            this.value = value;
        }
    
        @Override
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/collection/SingleValueIteratorTest.java

    import org.junit.Test;
    
    /**
     * @author koichik
     *
     */
    public class SingleValueIteratorTest {
    
        /**
         *
         */
        @Test
        public void test() {
            final SingleValueIterator<String> it = new SingleValueIterator<String>("Foo");
            assertThat(it.hasNext(), is(true));
            assertThat(it.next(), is("Foo"));
            assertThat(it.hasNext(), is(not(true)));
        }
    
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1.1K bytes
    - Viewed (0)
Back to top