public class FastSetSimple extends Object
Modifier and Type | Field and Description |
---|---|
static int |
LIMIT |
Constructor and Description |
---|
FastSetSimple()
Default constructor.
|
FastSetSimple(FastSetSimple c1,
FastSetSimple c2) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(int e) |
void |
addAll(FastSet c) |
void |
clear()
clear the set
|
void |
completeSet(int value) |
boolean |
contains(int o) |
boolean |
containsAll(FastSet c) |
boolean |
containsAny(FastSet c) |
boolean |
equals(Object arg0) |
int |
get(int i) |
int |
hashCode() |
boolean |
intersect(FastSet f) |
boolean |
isEmpty() |
void |
remove(int o) |
void |
removeAll(int i,
int end)
remove all elements between the two positions
|
void |
removeAllValues(int... vals) |
void |
removeAt(int i) |
int |
size() |
int[] |
toIntArray() |
String |
toString() |
public static final int LIMIT
public FastSetSimple()
public FastSetSimple(FastSetSimple c1, FastSetSimple c2)
c1
- c1c2
- c2public int get(int i)
i
- positionpublic boolean add(int e)
e
- add epublic void addAll(FastSet c)
c
- all elements to addpublic void clear()
FastSet
public boolean contains(int o)
o
- int to checkpublic boolean containsAll(FastSet c)
c
- elements to checkpublic boolean isEmpty()
public boolean containsAny(FastSet c)
c
- elements to checkpublic void remove(int o)
o
- element to removepublic int size()
public int[] toIntArray()
public boolean intersect(FastSet f)
f
- set to checkpublic void removeAt(int i)
i
- position to remove element frompublic void removeAll(int i, int end)
FastSet
i
- beginning positionend
- end positionpublic void removeAllValues(int... vals)
vals
- elements to removepublic void completeSet(int value)
value
- valueCopyright © 2020 The University of Manchester. All rights reserved.