public static HashSet getRandomIndexes_HashSet(
            Vector aVector,
            int aNumberOfIndexes,
            Random aRandom) {
        HashSet tIndexesToSwap_HashSet = new HashSet();
        int aIndex;
        int count = 0;
        if (aNumberOfIndexes > aVector.size() / 2) {
            for (aIndex = 0; aIndex < aVector.size(); aIndex++) {
                tIndexesToSwap_HashSet.add(aIndex);
                count++;
            }
            while (count != aNumberOfIndexes) {
                do {
                    aIndex = aRandom.nextInt(aVector.size());
                } while (!tIndexesToSwap_HashSet.remove(aIndex));
                count--;
            }
        } else {
            while (count < aNumberOfIndexes) {
                do {
                    aIndex = aRandom.nextInt(aVector.size());
                } while (!tIndexesToSwap_HashSet.add(aIndex));
                count++;
            }
        }
        return tIndexesToSwap_HashSet;
    }