本文整理匯總了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;
}