public boolean hasUser ( String userName ) { boolean result = false ; for ( User item : getUsersList ( ) ) { if ( item . getName ( ) . equals ( userName ) ) { result = true ; } } return result ; }
Check to see if a given user name is within the list of users . Checking will be done case sensitive .