本文整理汇总了Java中cc.mallet.pipe.iterator.StringArrayIterator类的典型用法代码示例。如果您正苦于以下问题:Java StringArrayIterator类的具体用法?Java StringArrayIterator怎么用?Java StringArrayIterator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StringArrayIterator类属于cc.mallet.pipe.iterator包,在下文中一共展示了StringArrayIterator类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testOne
import cc.mallet.pipe.iterator.StringArrayIterator; //导入依赖的package包/类
public void testOne ()
{
Pipe p = createPipe();
InstanceList ilist = new InstanceList (p);
ilist.addThruPipe(new StringArrayIterator(data));
assertTrue (ilist.size() == 3);
}
示例2: testOneFromSerialized
import cc.mallet.pipe.iterator.StringArrayIterator; //导入依赖的package包/类
public void testOneFromSerialized () throws IOException, ClassNotFoundException
{
Pipe p = createPipe ();
Pipe clone = (Pipe) TestSerializable.cloneViaSerialization (p);
InstanceList ilist = new InstanceList (clone);
ilist.addThruPipe(new StringArrayIterator(data));
assertTrue (ilist.size() == 3);
}
示例3: getInstanceList
import cc.mallet.pipe.iterator.StringArrayIterator; //导入依赖的package包/类
/**
*
* @param data
* @return
*/
public InstanceList getInstanceList(String[] data) {
InstanceList instances = new InstanceList(getPipe());
instances.addThruPipe(new StringArrayIterator(data));
return instances;
}