public static List < StoreDefinition > filterStores ( List < StoreDefinition > storeDefs , final boolean isReadOnly ) { List < StoreDefinition > filteredStores = Lists . newArrayList ( ) ; for ( StoreDefinition storeDef : storeDefs ) { if ( storeDef . getType ( ) . equals ( ReadOnlyStorageConfiguration . TYPE_NAME ) == isReadOnly ) { filteredStores . add ( storeDef ) ; } } return filteredStores ; }
Given a list of store definitions filters the list depending on the boolean