public CMASpaceMembership setRoles ( CMALink ... roles ) { if ( roles == null ) { throw new IllegalArgumentException ( "Roles cannot be null!" ) ; } if ( roles . length <= 0 ) { throw new IllegalArgumentException ( "Roles cannot be empty!" ) ; } this . roles = new ArrayList < CMALink > ( Arrays . asList ( roles ) ) ; return this ; }
Replace all roles with the given argument .