Code example for HashSet

public class ShadowBluetoothAdapter { 
    private static final int ADDRESS_LENGTH = 17;
    private Set<BluetoothDevice> bondedDevices = new HashSet<BluetoothDevice>();
    private boolean isDiscovering;
    private String address;
    private boolean enabled;
    private int state;
    public static BluetoothAdapter getDefaultAdapter() {
        return (BluetoothAdapter) shadowOf(Robolectric.application).getBluetoothAdapter();
    public Set<BluetoothDevice> getBondedDevices() {
        return Collections.unmodifiableSet(bondedDevices);
Connect your IDE to all the code out there  Get Codota for Java