@Test public void testIterator() { String str = "foo"; SingleRecordIterable<String> singleRecordIterable = new SingleRecordIterable<String>(str); Iterator<String> iterator = singleRecordIterable.iterator(); Assert.assertTrue(iterator.hasNext()); Assert.assertEquals(iterator.next(), str); Assert.assertFalse(iterator.hasNext()); }
@Override public Iterator<T> iterator() { return Iterators.singletonIterator(this.value); }
SingleRecordIterable implements Iterable<T> { @Override public Iterator<T> iterator() { return Iterators.singletonIterator(this.value); } }
SingleRecordIterable implements Iterable<T> { @Override public Iterator<T> iterator() { return Iterators.singletonIterator(this.value); } SingleRecordIterable(T value); }
SingleRecordIterable implements Iterable<T> { @Override public Iterator<T> iterator() { return Iterators.singletonIterator(this.value); } SingleRecordIterable(T value); @Override Iterator<T> iterator(); }
SingleRecordIterable implements Iterable<T> { @Override public Iterator<T> iterator() { return Iterators.singletonIterator(this.value); } SingleRecordIterable(T value); @Override Iterator<T> iterator();  }