本文整理了Java中gnu.trove.TIntArrayList.fill()
方法的一些代码示例,展示了TIntArrayList.fill()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TIntArrayList.fill()
方法的具体详情如下:
包路径:gnu.trove.TIntArrayList
类名称:TIntArrayList
方法名:fill
[英]See gnu.trove.list.array.TIntArrayList#fill(int)
[中]见gnu。宝藏。列表大堆TIntArrayList#填充(int)
代码示例来源:origin: de.julielab/jcore-mallet-0.4
/**
* Sets the size of the list to 0, but does not change its
* capacity. This method can be used as an alternative to the
* {@link #clear clear} method if you want to recyle a list without
* allocating new backing arrays.
*
* @see #clear
*/
public void reset() {
_pos = 0;
fill(0);
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-gis
public GISAttributeModel createUpperModel(final int _numObject, final TIntIntHashMap _newIdxOldIdx) {
if (_numObject < getSize()) {
throw new IllegalArgumentException("bad num objects");
}
if (_numObject == getSize()) {
return this;
}
final TIntArrayList newList = new TIntArrayList(_numObject);
newList.fill(((Integer) getAttribute().getDefaultValue()).intValue());
if (_newIdxOldIdx != null) {
final TIntIntIterator it = _newIdxOldIdx.iterator();
for (int i = _newIdxOldIdx.size(); i-- > 0;) {
it.advance();
final int newIdx = it.key();
newList.set(newIdx, list_.get(it.value()));
}
}
return new GISAttributeModelIntegerList(newList, this);
}
内容来源于网络,如有侵权,请联系作者删除!