public static boolean isLegalPoolInfo ( PoolInfo poolInfo ) { if ( poolInfo == null || poolInfo . getPoolGroupName ( ) == null || poolInfo . getPoolName ( ) == null ) { return false ; } if ( INVALID_REGEX_PATTERN . matcher ( poolInfo . getPoolGroupName ( ) ) . matches ( ) || poolInfo . getPoolGroupName ( ) . isEmpty ( ) ) { return false ; } if ( INVALID_REGEX_PATTERN . matcher ( poolInfo . getPoolName ( ) ) . matches ( ) || poolInfo . getPoolName ( ) . isEmpty ( ) ) { return false ; } return true ; }
Returns whether or not the given pool name is legal .