本文整理匯總了Java中org.galagosearch.core.retrieval.structured.StructuredIterator類的典型用法代碼示例。如果您正苦於以下問題:Java StructuredIterator類的具體用法?Java StructuredIterator怎麽用?Java StructuredIterator使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
StructuredIterator類屬於org.galagosearch.core.retrieval.structured包,在下文中一共展示了StructuredIterator類的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isStructuredIteratorOrArray
import org.galagosearch.core.retrieval.structured.StructuredIterator; //導入依賴的package包/類
public boolean isStructuredIteratorOrArray(Class c) {
if (c.isArray() && StructuredIterator.class.isAssignableFrom(c.getComponentType()))
return true;
if (StructuredIterator.class.isAssignableFrom(c))
return true;
return false;
}
示例2: testIsStructuredIteratorOrArray
import org.galagosearch.core.retrieval.structured.StructuredIterator; //導入依賴的package包/類
public void testIsStructuredIteratorOrArray() {
NodeType n = new NodeType(ExtentIterator.class);
assertTrue(n.isStructuredIteratorOrArray(ExtentIterator.class));
assertTrue(n.isStructuredIteratorOrArray(StructuredIterator.class));
assertFalse(n.isStructuredIteratorOrArray(Integer.class));
assertFalse(n.isStructuredIteratorOrArray(Date.class));
assertTrue(n.isStructuredIteratorOrArray(new ExtentIterator[0].getClass()));
}
示例3: testGetInputs
import org.galagosearch.core.retrieval.structured.StructuredIterator; //導入依賴的package包/類
public void testGetInputs() throws Exception {
NodeType n = new NodeType(FakeIterator.class);
Class[] input = n.getInputs();
assertEquals(3, input.length);
assertEquals(Parameters.class, input[0]);
assertEquals(ExtentIterator.class, input[1]);
assertEquals(new StructuredIterator[0].getClass(), input[2]);
}
示例4: testGetParameterTypes
import org.galagosearch.core.retrieval.structured.StructuredIterator; //導入依賴的package包/類
public void testGetParameterTypes() throws Exception {
NodeType n = new NodeType(FakeIterator.class);
Class[] input = n.getParameterTypes(5);
assertEquals(5, input.length);
assertEquals(Parameters.class, input[0]);
assertEquals(ExtentIterator.class, input[1]);
assertEquals(StructuredIterator.class, input[2]);
assertEquals(StructuredIterator.class, input[3]);
assertEquals(StructuredIterator.class, input[4]);
}
示例5: testGetConstructor
import org.galagosearch.core.retrieval.structured.StructuredIterator; //導入依賴的package包/類
public void testGetConstructor() throws Exception {
NodeType n = new NodeType(FakeIterator.class);
Constructor c = n.getConstructor();
Constructor actual =
FakeIterator.class.getConstructor(Parameters.class, ExtentIterator.class,
new StructuredIterator[0].getClass());
assertEquals(actual, c);
}
示例6: testIsUsableConstructor
import org.galagosearch.core.retrieval.structured.StructuredIterator; //導入依賴的package包/類
/**
* Test of isUsableConstructor method, of class FeatureFactory.
*/
public void testIsUsableConstructor() {
FeatureFactory f = new FeatureFactory(new Parameters());
Class[] types = new Class[] { Parameters.class };
ArrayList<StructuredIterator> iterators = new ArrayList();
assertTrue(f.isUsableConstructor(types, iterators));
types = new Class[] { Parameters.class, ExtentIterator.class };
iterators.clear();
iterators.add(new NullExtentIterator());
assertTrue(f.isUsableConstructor(types, iterators));
}
示例7: testArrayArgsForConstructor
import org.galagosearch.core.retrieval.structured.StructuredIterator; //導入依賴的package包/類
public void testArrayArgsForConstructor() {
FeatureFactory f = new FeatureFactory(new Parameters());
ArrayList<StructuredIterator> iterators = new ArrayList();
iterators.add(new NullExtentIterator());
ExtentIterator[] fakeArray = new ExtentIterator[1];
Class[] types = { Parameters.class, fakeArray.getClass() };
Object[] args = f.argsForConstructor(types, new Parameters(), iterators);
assertEquals(2, args.length);
assertEquals(Parameters.class.getName(), args[0].getClass().getName());
ExtentIterator[] array = (ExtentIterator[]) args[1];
assertEquals(iterators.get(0), array[0]);
}
示例8: testGetIterator
import org.galagosearch.core.retrieval.structured.StructuredIterator; //導入依賴的package包/類
/**
* Test of getIterator method, of class FeatureFactory.
*/
public void testGetIterator() throws Exception {
FeatureFactory f = new FeatureFactory(new Parameters());
ArrayList<StructuredIterator> iterators = new ArrayList();
iterators.add(new NullExtentIterator());
StructuredIterator iterator = f.getIterator(new Node("od", "5"), iterators);
assertEquals(OrderedWindowIterator.class.getName(), iterator.getClass().getName());
}
示例9: NodeType
import org.galagosearch.core.retrieval.structured.StructuredIterator; //導入依賴的package包/類
public NodeType(Class<? extends StructuredIterator> nodeClass) {
this.nodeClass = nodeClass;
}
示例10: getIteratorClass
import org.galagosearch.core.retrieval.structured.StructuredIterator; //導入依賴的package包/類
public Class<? extends StructuredIterator> getIteratorClass() {
return nodeClass;
}
示例11: FakeIterator
import org.galagosearch.core.retrieval.structured.StructuredIterator; //導入依賴的package包/類
public FakeIterator(Parameters parameters, ExtentIterator one, StructuredIterator[] two) {
}