package main;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.Random;

public class StructHM implements Structure {
    private HashMap<Integer, Integer> struct;
    private Random r;

    public StructHM() {
        this.struct = new HashMap<>();
        this.r = new Random(69420);
    }

    @Override
    public void remplir(int nOcc) {
        for (int i = 0; i < nOcc; i++) {
            this.struct.put(i, r.nextInt(nOcc + 1));
        }
    }

    @Override
    public void supprimer() {
        this.struct.remove(r.nextInt(struct.size()));
    }

    @Override
    public void acceder() {
        Integer val = this.struct.get(r.nextInt(struct.size()));
    }
}

