There are methods such as searching for duplicates but I wonder if there is a better solution for this task.
You can use Set collection. It won't allow insertion of unique values. Below is an example:
Set
Set doubles = new HashSet(); Random r = new Random(); for(int i=0 ; i<100 ; i++){ doubles.add(r.nextDouble() * 100); }