public class LongList extends ElementList
Modifier and Type | Field and Description |
---|---|
protected long[] |
list
Element container.
|
factor, size
Constructor and Description |
---|
LongList()
Default constructor.
|
LongList(long capacity)
Constructor with initial capacity.
|
Modifier and Type | Method and Description |
---|---|
LongList |
add(long... elements)
Adds elements to the array.
|
LongList |
add(long element)
Adds an element to the array.
|
LongList |
distinct()
Removes duplicate entries.
|
boolean |
equals(Object obj) |
long[] |
finish()
Returns an array with all elements and invalidates the internal array.
|
long |
get(int index)
Returns the element at the specified position.
|
long |
peek()
Returns the uppermost element from the stack.
|
long |
pop()
Pops the uppermost element from the stack.
|
void |
push(long element)
Pushes an element onto the stack.
|
LongList |
sort()
Sorts the data.
|
long[] |
toArray()
Returns an array with all elements.
|
String |
toString() |
isEmpty, newCapacity, newCapacity, reset, size, size
public LongList()
public LongList(long capacity)
capacity
- array capacitypublic final LongList add(long element)
element
- element to be addedpublic final LongList add(long... elements)
elements
- elements to be addedpublic final long get(int index)
index
- index of the element to returnpublic final long peek()
public final long pop()
public final void push(long element)
element
- elementpublic final long[] toArray()
public long[] finish()
public LongList sort()
public LongList distinct()
Copyright © 2005–2023 BaseX Team. All rights reserved.