private void remove_i(final String p, final boolean fwd) {
	if (name_equals(p)) {
	    System.out.println("Group::remove_i::failed to remove " + p + " (can't remove self)");
	    return;
	}
	if (p.indexOf('*') == -1) {
	    final Iterator it = elements.iterator();
	    while (it.hasNext()) {
		final GroupElement e = (GroupElement) it.next();
		if (e.name_equals(p)) {
		    elements.remove(e);
		    break;
		}
	    }
	} else {
	    final Vector remove_list = new Vector();
	    Iterator it = elements.iterator();
	    while (it.hasNext()) {
		final GroupElement e = (GroupElement) it.next();
		if (e.name_matches(p)) {
		    remove_list.add(e);
		}
	    }
	    it = remove_list.iterator();
	    while (it.hasNext()) {
		elements.remove(it.next());
	    }
	}
	if (fwd == true) {
	    final Iterator it = elements.iterator();
	    while (it.hasNext()) {
		final GroupElement e = (GroupElement) it.next();
		if (e instanceof Group) {
		    ((Group) e).remove(p, fwd);
		}
	    }
	}
    }
private void remove_i ( final String p , final boolean fwd ) { if ( name_equals ( p ) ) { System . out . println ( "Group::remove_i::failed to remove " + p + " (can't remove self)" ) ; return ; } if ( p . indexOf ( '*' ) == - 1 ) { final Iterator it = elements . iterator ( ) ; while ( it . hasNext ( ) ) { final GroupElement e = ( GroupElement ) it . next ( ) ; if ( e . name_equals ( p ) ) { elements . remove ( e ) ; break ; } } } else { final Vector remove_list = new Vector ( ) ; Iterator it = elements . iterator ( ) ; while ( it . hasNext ( ) ) { final GroupElement e = ( GroupElement ) it . next ( ) ; if ( e . name_matches ( p ) ) { remove_list . add ( e ) ; } } it = remove_list . iterator ( ) ; while ( it . hasNext ( ) ) { elements . remove ( it . next ( ) ) ; } } if ( fwd == true ) { final Iterator it = elements . iterator ( ) ; while ( it . hasNext ( ) ) { final GroupElement e = ( GroupElement ) it . next ( ) ; if ( e instanceof Group ) { ( ( Group ) e ) . remove ( p , fwd ) ; } } } }
Remove elements matching pattern
<p>
from the group