export default abstract class CompactionOptions { constructor ( readonly strategy ) { } public abstract buildSpecificOptions ( ) ; public build ( ) { const options = [ ... this . _buildCommonOptions ( ) , ... this . buildSpecificOptions ( ) , ] ; return `{ ${ options . join ( ', ' ) } }` ; } private _buildCommonOptions ( ) { const options = [ ] ; options . push ( `'class': '${ this . strategy }'` ) ; return options ; } }