Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for hasNext (0.18 sec)

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

        public SingleValueIterator(final E value) {
            this.value = value;
        }
    
        @Override
        public boolean hasNext() {
            return hasNext;
        }
    
        @Override
        public E next() {
            if (!hasNext) {
                throw new NoSuchElementException();
            }
            hasNext = false;
            return value;
        }
    
        @Override
        public void remove() {
    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)
  2. src/test/java/org/codelibs/core/collection/EmptyIteratorTest.java

            emptyIterator.remove();
        }
    
        /**
         * Test method for
         * {@link org.codelibs.core.collection.EmptyIterator#hasNext()}.
         */
        @Test
        public void testHasNext() {
            final EmptyIterator<String> emptyIterator = new EmptyIterator<String>();
            assertThat(emptyIterator.hasNext(), is(false));
        }
    
        /**
         * Test method for {@link org.codelibs.core.collection.EmptyIterator#next()}.
         */
    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)
  3. src/main/java/org/codelibs/core/collection/IndexedIterator.java

            assertArgumentNotNull("iterator", iterator);
    
            this.iterator = iterator;
            this.index = 0;
        }
    
        @Override
        public boolean hasNext() {
            return iterator.hasNext();
        }
    
        @Override
        public Indexed<T> next() {
            return new Indexed<>(iterator.next(), index++);
        }
    
        @Override
        public void remove() {
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.7K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/io/LineIterator.java

            this.reader = reader;
        }
    
        @Override
        public boolean hasNext() {
            if (line == EMPTY) {
                line = ReaderUtil.readLine(reader);
            }
            return line != null;
        }
    
        @Override
        public String next() {
            if (!hasNext()) {
                throw new NoSuchElementException();
            }
            final String result = line;
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  5. src/main/java/org/codelibs/core/lang/ClassIterator.java

            this.includeObject = includeObject;
        }
    
        @Override
        public boolean hasNext() {
            if (!includeObject && clazz == Object.class) {
                return false;
            }
            return clazz != null;
        }
    
        @Override
        public Class<?> next() {
            if (!hasNext()) {
                throw new NoSuchElementException();
            }
            final Class<?> result = clazz;
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  6. src/main/java/org/codelibs/core/collection/EmptyIterator.java

         */
        public EmptyIterator() {
        }
    
        @Override
        public void remove() {
            throw new ClUnsupportedOperationException("remove");
        }
    
        @Override
        public boolean hasNext() {
            return false;
        }
    
        @Override
        public T next() {
            throw new ClUnsupportedOperationException("next");
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.3K bytes
    - Viewed (0)
  7. src/test/java/org/codelibs/core/collection/ArrayMapTest.java

            for (Iterator<Map.Entry<String, Object>> i = hmap.entrySet().iterator(); i.hasNext();) {
                i.next();
            }
            System.out.println("HashMap iteration:" + (System.currentTimeMillis() - start));
    
            start = System.currentTimeMillis();
            for (Iterator<Map.Entry<String, Object>> i = amap.entrySet().iterator(); i.hasNext();) {
                i.next();
            }
    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)
  8. src/test/java/org/codelibs/core/collection/MultiIteratorTest.java

            assertThat(it.hasNext(), is(true));
            assertThat(it.next(), is("Foo"));
    
            assertThat(it.hasNext(), is(true));
            assertThat(it.next(), is("Bar"));
    
            assertThat(it.hasNext(), is(true));
            assertThat(it.next(), is("Baz"));
    
            assertThat(it.hasNext(), is(not(true)));
        }
    
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/core/lang/ClassLoaderIteratorTest.java

            assertThat(it.hasNext(), is(true));
            assertThat(it.next(), is(sameInstance(cl3)));
    
            assertThat(it.hasNext(), is(true));
            assertThat(it.next(), is(sameInstance(cl2)));
    
            assertThat(it.hasNext(), is(true));
            assertThat(it.next(), is(sameInstance(cl1)));
    
            assertThat(it.hasNext(), is(not(true)));
        }
    
    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/test/java/org/codelibs/core/collection/ArrayIteratorTest.java

         */
        @Test
        public void testHasNext() {
            final ArrayIterator<String> itr = new ArrayIterator<String>("A", "B");
            assertThat(itr.hasNext(), is(true));
            itr.next();
            assertThat(itr.hasNext(), is(true));
            itr.next();
            assertThat(itr.hasNext(), is(not(true)));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testRemove() throws Exception {
    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)
Back to top