本文整理了Java中java.util.Vector.addAll()
方法的一些代码示例,展示了Vector.addAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vector.addAll()
方法的具体详情如下:
包路径:java.util.Vector
类名称:Vector
方法名:addAll
[英]Inserts the objects in the specified collection at the specified location in this vector. The objects are inserted in the order in which they are returned from the Collection iterator. The elements with an index equal or higher than location have their index increased by the size of the added collection.
[中]在此向量中的指定位置插入指定集合中的对象。对象按从集合迭代器返回的顺序插入。索引等于或高于location的元素的索引会随着添加集合的大小而增加。
代码示例来源:origin: google/guava
private static Enumeration<Integer> enumerate(Integer... ints) {
Vector<Integer> vector = new Vector<>();
vector.addAll(asList(ints));
return vector.elements();
}
代码示例来源:origin: marytts/marytts
public static Collection<File> listFiles(File directory, FilenameFilter filter, boolean recurse) {
// List of files / directories
Vector<File> files = new Vector<File>();
// Get files / directories in the directory
File[] entries = directory.listFiles();
// Go over entries
for (File entry : entries) {
// If there is no filter or the filter accepts the
// file / directory, add it to the list
if (filter == null || filter.accept(directory, entry.getName())) {
files.add(entry);
}
// If the file is a directory and the recurse flag
// is set, recurse into the directory
if (recurse && entry.isDirectory()) {
files.addAll(listFiles(entry, filter, recurse));
}
}
// Return collection of files
return files;
}
代码示例来源:origin: embulk/embulk
urls.add(rootUrls.nextElement());
urls.addAll(childUrls);
} catch (PrivilegedActionException ignored) {
return urls.elements();
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> result = new Vector<Option>();
result.addElement(new Option("\tThe class index\n" + "\t(default: last)",
"c", 1, "-c <class index>"));
result.addAll(Collections.list(super.listOptions()));
return result.elements();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
public Enumeration<Option> listOptions() {
Vector<Option> result = new Vector<Option>();
result.add(new Option(
"\tSkip identical instances (distances equal to zero).\n",
"S", 1,"-S"));
result.addAll(Collections.list(super.listOptions()));
return result.elements();
}
代码示例来源:origin: org.apache.ant/ant
Set<String> toAnalyze = new HashSet<>(Collections.list(getRootClasses()));
Set<String> analyzedDeps = new HashSet<>();
files.addAll(containers);
classes.removeAllElements();
classes.addAll(dependencies);
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> result = new Vector<Option>();
result.addElement(new Option("\tRandom number seed.\n" + "\t(default "
+ m_SeedDefault + ")", "S", 1, "-S <num>"));
result.addAll(Collections.list(super.listOptions()));
return result.elements();
}
代码示例来源:origin: marytts/marytts
public static Collection<File> listFiles(File directory, FilenameFilter filter, boolean recurse) {
// List of files / directories
Vector<File> files = new Vector<File>();
// Get files / directories in the directory
File[] entries = directory.listFiles();
// Go over entries
for (File entry : entries) {
// If there is no filter or the filter accepts the
// file / directory, add it to the list
if (filter == null || filter.accept(directory, entry.getName())) {
files.add(entry);
}
// If the file is a directory and the recurse flag
// is set, recurse into the directory
if (recurse && entry.isDirectory()) {
files.addAll(listFiles(entry, filter, recurse));
}
}
// Return collection of files
return files;
}
代码示例来源:origin: nz.ac.waikato.cms.weka/multiInstanceFilters
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>(1);
newVector.add(new Option(
"\tSpecify the sigma parameter (default: sqrt(800000)", "S", 1,
"-S <num>"));
newVector.addAll(Collections.list(super.listOptions()));
return newVector.elements();
}
代码示例来源:origin: apache/activemq
/**
* return all property names, including standard JMS properties and JMSX properties
* @return Enumeration of all property names on this message
* @throws JMSException
*/
@SuppressWarnings("rawtypes")
public Enumeration getAllPropertyNames() throws JMSException {
try {
Vector<String> result = new Vector<String>(this.getProperties().keySet());
result.addAll(JMS_PROPERTY_SETERS.keySet());
return result.elements();
} catch (IOException e) {
throw JMSExceptionSupport.create(e);
}
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>();
newVector.addElement(new Option("\tOutput additional statistics.",
"additional-stats", 0, "-additional-stats"));
newVector.addAll(Collections.list(super.listOptions()));
return newVector.elements();
}
代码示例来源:origin: smuyyh/BookReader
paraLines.add(strParagraph.substring(0, paintSize));
strParagraph = strParagraph.substring(paintSize);
lines.addAll(0, paraLines);
代码示例来源:origin: Waikato/weka-trunk
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
public Enumeration<Option> listOptions() {
Vector<Option> result = new Vector<Option>();
result.add(new Option(
"\tSkip identical instances (distances equal to zero).\n",
"S", 1,"-S"));
result.addAll(Collections.list(super.listOptions()));
return result.elements();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> result = new Vector<Option>();
result.addElement(new Option("\tThe class index\n" + "\t(default: last)",
"c", 1, "-c <class index>"));
result.addAll(Collections.list(super.listOptions()));
return result.elements();
}
代码示例来源:origin: ankidroid/Anki-Android
} else {
if (onFrameContainer.getSize() > 0) {
onFrameDrawables.add(onFrameContainer);
onFrameDrawables.add(onFrameContainer);
onFrameDrawables.add(drawable);
onFrameContainer = new DrawableContainer(true, false);
this.screenParts.get(0).getDrawables().addAll(offFrameDrawables);
this.screenParts.get(0).getDrawables().addAll(onFrameDrawables);
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Returns an enumeration describing the available options
*
* @return an enumeration of all the available options
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>(4);
newVector.add(new Option("\tUse unpruned tree/rules", "N", 0, "-N"));
newVector.add(new Option("\tUse unsmoothed predictions", "U", 0, "-U"));
newVector.add(new Option("\tBuild regression tree/rule rather "
+ "than a model tree/rule", "R", 0, "-R"));
newVector.add(new Option("\tSet minimum number of instances "
+ "per leaf\n\t(default 4)", "M", 1, "-M <minimum number of instances>"));
newVector.addAll(Collections.list(super.listOptions()));
return newVector.elements();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> result = new Vector<Option>();
result.addElement(new Option("The class index", "c", 1,
"-c <the class index>"));
result.addAll(Collections.list(super.listOptions()));
return result.elements();
}
代码示例来源:origin: xalan/xalan
final Object element = elements.nextElement();
if (element instanceof Key) {
varDepElements.add(element);
whitespaceRules.addAll(((Whitespace)element).getRules());
代码示例来源:origin: Waikato/weka-trunk
/**
* Returns an enumeration describing the available options
*
* @return an enumeration of all the available options
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>(4);
newVector.add(new Option("\tUse unpruned tree/rules", "N", 0, "-N"));
newVector.add(new Option("\tUse unsmoothed predictions", "U", 0, "-U"));
newVector.add(new Option("\tBuild regression tree/rule rather "
+ "than a model tree/rule", "R", 0, "-R"));
newVector.add(new Option("\tSet minimum number of instances "
+ "per leaf\n\t(default 4)", "M", 1, "-M <minimum number of instances>"));
newVector.addAll(Collections.list(super.listOptions()));
return newVector.elements();
}
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
/**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/
@Override
public Enumeration<Option> listOptions() {
Vector<Option> newVector = new Vector<Option>();
newVector.addElement(new Option("\tSet base of the expansion constant\n"
+ "\t(default = 1.3).", "B", 1, "-B <value>"));
newVector.addAll(Collections.list(super.listOptions()));
return newVector.elements();
}
内容来源于网络,如有侵权,请联系作者删除!