public class PrimitiveLongStack extends Object implements PrimitiveLongCollection
Stack<Long> but for primitive longs. Virtually GC free in that it has an long[]
and merely moves a cursor where to push(long) and poll() values to and from.
If many items goes in the stack the long[] will grow to accomodate all of them, but not shrink again.| Constructor and Description |
|---|
PrimitiveLongStack(int initialSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
close()
Free any attached resources.
|
boolean |
isEmpty() |
PrimitiveLongIterator |
iterator() |
long |
poll() |
void |
push(long value) |
int |
size() |
void |
visitKeys(PrimitiveLongVisitor visitor)
Visit the keys of this collection, until all have been visited or the visitor returns 'true'.
|
public boolean isEmpty()
isEmpty in interface PrimitiveCollectionpublic void clear()
clear in interface PrimitiveCollectionpublic int size()
size in interface PrimitiveCollectionpublic void close()
PrimitiveCollectionclose in interface AutoCloseableclose in interface PrimitiveCollectionpublic PrimitiveLongIterator iterator()
iterator in interface PrimitiveLongIterablepublic void visitKeys(PrimitiveLongVisitor visitor)
PrimitiveLongCollectionvisitKeys in interface PrimitiveLongCollectionpublic void push(long value)
public long poll()
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.