public boolean contains ( Privilege p ) { if ( p . getName ( ) . equalsIgnoreCase ( this . getName ( ) ) ) { return true ; } Privilege [ ] list = getAggregatePrivileges ( ) ; for ( Privilege privilege : list ) { if ( privilege . getName ( ) . equalsIgnoreCase ( p . getName ( ) ) ) { return true ; } } return false ; }
Tests given privilege .