src/lib/collections/hash-set.js
function (match) {
        assertType(match, Function);

        var len = this.count(),
            arr = this.table.entries(true),
            removed = 0,
            item;


        while (len-- > 0) {
            item = arr[len];

            if (match(item) && this.table.remove(item)) {
                removed++;
            }
        }

        return removed;
    }
function (match) {
        assertType(match, Function);

        var len = this.count(),
            arr = this.table.entries(true),
            removed = 0,
            item;


        while (len-- > 0) {
            item = arr[len];

            if (match(item) && this.table.remove(item)) {
                removed++;
            }
        }

        return removed;
    }
function ( match ) { assertType ( match , Function ) ; var len = this . count ( ) , arr = this . table . entries ( true ) , removed = 0 , item ; while ( len -- > 0 ) { item = arr [ len ] ; if ( match ( item ) && this . table . remove ( item ) ) { removed ++ ; } } return removed ; }
Removes all elements that match the conditions defined by the specified predicate from a HashSet collection.
@param {Function} match The predicate function that defines the conditions of the elements to remove. eg. function(item)
@returns {Number}
Removes all elements that match the conditions defined by the specified predicate from a HashSet collection .