Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class IntSetImpl implements IntSet {
- private List<int> conjunto; //lista de inteiros
- IntSetImpl ( ) {
- this.conjunto = new ArrayList <int>(); //crio nova lista de inteiros vazia
- }
- void insert ( int x ) {
- this.conjunto.add(x);
- }
- void insertAll ( int [ ] v ){
- int count = 0;
- while (count < v.size ) {
- insert(v[count]);
- count++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement