本文整理了Java中com.carrotsearch.hppc.LongHashSet.addAll()
方法的一些代码示例,展示了LongHashSet.addAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LongHashSet.addAll()
方法的具体详情如下:
包路径:com.carrotsearch.hppc.LongHashSet
类名称:LongHashSet
方法名:addAll
[英]Adds all elements from the given LongContainer to this set.
[中]将给定长容器中的所有元素添加到此集合。
代码示例来源:origin: carrotsearch/hppc
/**
* Create a set from a variable number of arguments or an array of
* <code>long</code>. The elements are copied from the argument to the
* internal buffer.
*/
/* */
public static LongHashSet from(long... elements) {
final LongHashSet set = new LongHashSet(elements.length);
set.addAll(elements);
return set;
}
代码示例来源:origin: carrotsearch/hppc
/**
* New instance copying elements from another {@link LongContainer}.
*/
public LongHashSet(LongContainer container) {
this(container.size());
addAll(container);
}
代码示例来源:origin: carrotsearch/hppc
/**
* Adds all elements from the given {@link LongContainer} to this set.
*
* @return Returns the number of elements actually added as a result of this
* call (not previously present in the set).
*/
public int addAll(LongContainer container) {
ensureCapacity(container.size());
return addAll((Iterable<? extends LongCursor>) container);
}
代码示例来源:origin: sirensolutions/siren-join
@Override
protected void addAll(TermsSet terms) {
if (!(terms instanceof LongTermsSet)) {
throw new UnsupportedOperationException("Invalid type: LongTermSet expected.");
}
this.set.addAll(((LongTermsSet) terms).set);
}
代码示例来源:origin: harbby/presto-connectors
/**
* New instance copying elements from another {@link LongContainer}.
*/
public LongHashSet(LongContainer container) {
this(container.size());
addAll(container);
}
代码示例来源:origin: harbby/presto-connectors
/**
* Create a set from a variable number of arguments or an array of
* <code>long</code>. The elements are copied from the argument to the
* internal buffer.
*/
/* */
public static LongHashSet from(long... elements) {
final LongHashSet set = new LongHashSet(elements.length);
set.addAll(elements);
return set;
}
代码示例来源:origin: harbby/presto-connectors
/**
* Adds all elements from the given {@link LongContainer} to this set.
*
* @return Returns the number of elements actually added as a result of this
* call (not previously present in the set).
*/
public int addAll(LongContainer container) {
ensureCapacity(container.size());
return addAll((Iterable<? extends LongCursor>) container);
}
内容来源于网络,如有侵权,请联系作者删除!