public boolean projectExists ( String name ) throws IllegalArgumentException { if ( name == null || name . isEmpty ( ) ) { throw new IllegalArgumentException ( "Project name cannot be empty" ) ; } return listProjects ( ) . stream ( ) . map ( p -> p . getMetadata ( ) . getName ( ) ) . anyMatch ( Predicate . isEqual ( name ) ) ; }
Checks if the given project exists or not .