本文整理了Java中org.eclipse.collections.impl.set.mutable.primitive.LongHashSet.longIterator()
方法的一些代码示例,展示了LongHashSet.longIterator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LongHashSet.longIterator()
方法的具体详情如下:
包路径:org.eclipse.collections.impl.set.mutable.primitive.LongHashSet
类名称:LongHashSet
方法名:longIterator
暂无
代码示例来源:origin: eclipse/eclipse-collections
@Override
public LongIterator longIterator()
{
return new UnmodifiableLongIterator(LongHashSet.newSetWith(this.element).longIterator());
}
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public LongIterator longIterator()
{
return new UnmodifiableLongIterator(LongHashSet.newSetWith(this.element).longIterator());
}
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public LongSet freeze()
{
if (this.size() == 0)
{
return LongSets.immutable.with();
}
if (this.size() == 1)
{
return LongSets.immutable.with(this.longIterator().next());
}
this.copyOnWrite = true;
return new ImmutableLongHashSet(this.table, this.occupiedWithData, this.zeroToThirtyOne, this.zeroToThirtyOneOccupied);
}
代码示例来源:origin: neo4j/neo4j
@Override
protected void collectAddedTxStateSnapshot()
{
if ( isSingle() )
{
addedRelationships = read.txState().relationshipIsAddedInThisTx( single )
? LongHashSet.newSetWith( single ).longIterator()
: ImmutableEmptyLongIterator.INSTANCE;
}
else
{
addedRelationships = read.txState().addedAndRemovedRelationships().getAdded().longIterator();
}
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public LongSet freeze()
{
if (this.size() == 0)
{
return LongSets.immutable.with();
}
if (this.size() == 1)
{
return LongSets.immutable.with(this.longIterator().next());
}
this.copyOnWrite = true;
return new ImmutableLongHashSet(this.table, this.occupiedWithData, this.zeroToThirtyOne, this.zeroToThirtyOneOccupied);
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public ImmutableLongSet toImmutable()
{
if (this.size() == 0)
{
return LongSets.immutable.with();
}
if (this.size() == 1)
{
return LongSets.immutable.with(this.longIterator().next());
}
LongHashSet mutableSet = LongHashSet.newSetWith(this.toArray());
return new ImmutableLongHashSet(mutableSet.table, mutableSet.occupiedWithData, mutableSet.zeroToThirtyOne, mutableSet.zeroToThirtyOneOccupied);
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public ImmutableLongSet toImmutable()
{
if (this.size() == 0)
{
return LongSets.immutable.with();
}
if (this.size() == 1)
{
return LongSets.immutable.with(this.longIterator().next());
}
LongHashSet mutableSet = LongHashSet.newSetWith(this.toArray());
return new ImmutableLongHashSet(mutableSet.table, mutableSet.occupiedWithData, mutableSet.zeroToThirtyOne, mutableSet.zeroToThirtyOneOccupied);
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public RichIterable<LongIterable> chunk(int size)
{
if (size <= 0)
{
throw new IllegalArgumentException("Size for groups must be positive but was: " + size);
}
MutableList<LongIterable> result = Lists.mutable.empty();
if (this.notEmpty())
{
if (this.size() <= size)
{
result.add(LongSets.mutable.withAll(this));
}
else
{
LongIterator iterator = this.longIterator();
while (iterator.hasNext())
{
MutableLongSet batch = LongSets.mutable.empty();
for (int i = 0; i < size && iterator.hasNext(); i++)
{
batch.add(iterator.next());
}
result.add(batch);
}
}
}
return result;
}
代码示例来源:origin: eclipse/eclipse-collections
@Override
public RichIterable<LongIterable> chunk(int size)
{
if (size <= 0)
{
throw new IllegalArgumentException("Size for groups must be positive but was: " + size);
}
MutableList<LongIterable> result = Lists.mutable.empty();
if (this.notEmpty())
{
if (this.size() <= size)
{
result.add(LongSets.mutable.withAll(this));
}
else
{
LongIterator iterator = this.longIterator();
while (iterator.hasNext())
{
MutableLongSet batch = LongSets.mutable.empty();
for (int i = 0; i < size && iterator.hasNext(); i++)
{
batch.add(iterator.next());
}
result.add(batch);
}
}
}
return result;
}
代码示例来源:origin: org.eclipse.collections/eclipse-collections
@Override
public LongIterator longIterator()
{
return new UnmodifiableLongIterator(LongHashSet.newSetWith(this.element).longIterator());
}
}
代码示例来源:origin: org.eclipse.collections/eclipse-collections
@Override
public LongSet freeze()
{
if (this.size() == 0)
{
return LongSets.immutable.with();
}
if (this.size() == 1)
{
return LongSets.immutable.with(this.longIterator().next());
}
this.copyOnWrite = true;
return new ImmutableLongHashSet(this.table, this.occupiedWithData, this.zeroToThirtyOne, this.zeroToThirtyOneOccupied);
}
代码示例来源:origin: org.eclipse.collections/eclipse-collections
@Override
public ImmutableLongSet toImmutable()
{
if (this.size() == 0)
{
return LongSets.immutable.with();
}
if (this.size() == 1)
{
return LongSets.immutable.with(this.longIterator().next());
}
LongHashSet mutableSet = LongHashSet.newSetWith(this.toArray());
return new ImmutableLongHashSet(mutableSet.table, mutableSet.occupiedWithData, mutableSet.zeroToThirtyOne, mutableSet.zeroToThirtyOneOccupied);
}
代码示例来源:origin: org.neo4j/neo4j-kernel
@Override
protected void collectAddedTxStateSnapshot()
{
if ( isSingle() )
{
addedRelationships = read.txState().relationshipIsAddedInThisTx( single )
? LongHashSet.newSetWith( single ).longIterator()
: ImmutableEmptyLongIterator.INSTANCE;
}
else
{
addedRelationships = read.txState().addedAndRemovedRelationships().getAdded().longIterator();
}
}
代码示例来源:origin: org.eclipse.collections/eclipse-collections
@Override
public RichIterable<LongIterable> chunk(int size)
{
if (size <= 0)
{
throw new IllegalArgumentException("Size for groups must be positive but was: " + size);
}
MutableList<LongIterable> result = Lists.mutable.empty();
if (this.notEmpty())
{
if (this.size() <= size)
{
result.add(LongSets.mutable.withAll(this));
}
else
{
LongIterator iterator = this.longIterator();
while (iterator.hasNext())
{
MutableLongSet batch = LongSets.mutable.empty();
for (int i = 0; i < size && iterator.hasNext(); i++)
{
batch.add(iterator.next());
}
result.add(batch);
}
}
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!