本文整理匯總了Java中org.apache.solr.common.util.IteratorChain類的典型用法代碼示例。如果您正苦於以下問題:Java IteratorChain類的具體用法?Java IteratorChain怎麽用?Java IteratorChain使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IteratorChain類屬於org.apache.solr.common.util包,在下文中一共展示了IteratorChain類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testCallNextTooEarly
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testCallNextTooEarly() {
final IteratorChain<String> c = new IteratorChain<>();
c.addIterator(makeIterator("a",3));
try {
c.next();
fail("Calling next() before hasNext() should throw RuntimeException");
} catch(RuntimeException asExpected) {
// we're fine
}
}
示例2: testCallAddTooLate
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testCallAddTooLate() {
final IteratorChain<String> c = new IteratorChain<>();
c.hasNext();
try {
c.addIterator(makeIterator("a",3));
fail("Calling addIterator after hasNext() should throw RuntimeException");
} catch(RuntimeException asExpected) {
// we're fine
}
}
示例3: testRemove
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testRemove() {
final IteratorChain<String> c = new IteratorChain<>();
try {
c.remove();
fail("Calling remove should throw UnsupportedOperationException");
} catch(UnsupportedOperationException asExpected) {
// we're fine
}
}
示例4: testEmptyIteratorsInTheMiddle
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testEmptyIteratorsInTheMiddle() {
final IteratorChain<String> c = new IteratorChain<>();
c.addIterator(makeIterator("a",3));
c.addIterator(makeIterator("b",0));
c.addIterator(makeIterator("c",1));
assertEquals("a1a2a3c1",getString(c));
}
示例5: getParameterNamesIterator
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
@Override
public Iterator<String> getParameterNamesIterator() {
final IteratorChain<String> c = new IteratorChain<String>();
c.addIterator(defaults.getParameterNamesIterator());
c.addIterator(params.getParameterNamesIterator());
return c;
}
示例6: testCallNextTooEarly
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testCallNextTooEarly() {
final IteratorChain<String> c = new IteratorChain<String>();
c.addIterator(makeIterator("a",3));
try {
c.next();
fail("Calling next() before hasNext() should throw RuntimeException");
} catch(RuntimeException asExpected) {
// we're fine
}
}
示例7: testCallAddTooLate
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testCallAddTooLate() {
final IteratorChain<String> c = new IteratorChain<String>();
c.hasNext();
try {
c.addIterator(makeIterator("a",3));
fail("Calling addIterator after hasNext() should throw RuntimeException");
} catch(RuntimeException asExpected) {
// we're fine
}
}
示例8: testRemove
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testRemove() {
final IteratorChain<String> c = new IteratorChain<String>();
try {
c.remove();
fail("Calling remove should throw UnsupportedOperationException");
} catch(UnsupportedOperationException asExpected) {
// we're fine
}
}
示例9: testEmptyIteratorsInTheMiddle
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testEmptyIteratorsInTheMiddle() {
final IteratorChain<String> c = new IteratorChain<String>();
c.addIterator(makeIterator("a",3));
c.addIterator(makeIterator("b",0));
c.addIterator(makeIterator("c",1));
assertEquals("a1a2a3c1",getString(c));
}
示例10: testNoIterator
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testNoIterator() {
final IteratorChain<String> c = new IteratorChain<>();
assertFalse("Empty IteratorChain.hastNext() is false",c.hasNext());
assertEquals("",getString(c));
}
示例11: testOneIterator
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testOneIterator() {
final IteratorChain<String> c = new IteratorChain<>();
c.addIterator(makeIterator("a",3));
assertEquals("a1a2a3",getString(c));
}
示例12: testTwoIterators
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testTwoIterators() {
final IteratorChain<String> c = new IteratorChain<>();
c.addIterator(makeIterator("a",3));
c.addIterator(makeIterator("b",2));
assertEquals("a1a2a3b1b2",getString(c));
}
示例13: testNoIterator
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testNoIterator() {
final IteratorChain<String> c = new IteratorChain<String>();
assertFalse("Empty IteratorChain.hastNext() is false",c.hasNext());
assertEquals("",getString(c));
}
示例14: testOneIterator
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testOneIterator() {
final IteratorChain<String> c = new IteratorChain<String>();
c.addIterator(makeIterator("a",3));
assertEquals("a1a2a3",getString(c));
}
示例15: testTwoIterators
import org.apache.solr.common.util.IteratorChain; //導入依賴的package包/類
public void testTwoIterators() {
final IteratorChain<String> c = new IteratorChain<String>();
c.addIterator(makeIterator("a",3));
c.addIterator(makeIterator("b",2));
assertEquals("a1a2a3b1b2",getString(c));
}