public class Set_Swap_Array extends Set_Swap
Modifier and Type | Field and Description |
---|---|
protected int[] |
map |
array, arrayLength, currentIdx, size, sizeMax
Constructor and Description |
---|
Set_Swap_Array(int n) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(int element)
Add element to the set
Does not guaranty there is no duplications
|
boolean |
contain(int element)
Test the existence of element in the set
|
SetType |
getSetType() |
boolean |
remove(int element)
Remove the first occurence of element from the set
|
addSize, clear, getFirstElement, getMaxSize, getNextElement, getSize, isEmpty, setSize, toArray, toString
public boolean contain(int element)
ISet
element
- element to addpublic boolean add(int element)
ISet
element
- element to addpublic boolean remove(int element)
ISet
element
- element to addpublic SetType getSetType()
Copyright © 2015. All rights reserved.