public final class IntegerArray extends Object
Constructor and Description |
---|
IntegerArray() |
IntegerArray(int size) |
IntegerArray(int[] array) |
Modifier and Type | Method and Description |
---|---|
void |
add(int value) |
void |
addNew(int value)
Adds new int at the end if not already present.
|
int |
at(int index) |
int |
cardinality() |
void |
clear() |
Object |
clone() |
int |
indexOf(int n) |
int |
last() |
void |
merge(IntegerArray other)
Merge two sorted arrays and eliminate duplicates.
|
void |
pop() |
void |
pop(int n) |
int |
popLast() |
void |
print(PrintStream out) |
void |
reverse() |
void |
set(int index,
int value) |
void |
setLast(int n) |
void |
sort() |
int[] |
toIntArray() |
public IntegerArray()
public IntegerArray(int size)
public IntegerArray(int[] array)
public void clear()
public int[] toIntArray()
public final int at(int index)
public final void set(int index, int value)
public int indexOf(int n)
public final void add(int value)
public void addNew(int value)
public void reverse()
public void merge(IntegerArray other)
public void sort()
public int popLast()
public int last()
public void setLast(int n)
public void pop()
public void pop(int n)
public final int cardinality()
public void print(PrintStream out)
Copyright © 2018 JBoss by Red Hat. All rights reserved.