public synchronized Record retain ( final URI ... properties ) { for ( final URI property : doGetProperties ( ) ) { boolean retain = false ; for ( int i = 0 ; i < properties . length ; ++ i ) { if ( property . equals ( properties [ i ] ) ) { retain = true ; break ; } } if ( ! retain ) { doSet ( property , ImmutableSet . < Object > of ( ) ) ; } } return this ; }
Retains only the properties specified clearing the remaining ones . Note that the ID is not affected .