public Capabilities modifyCapabilities(Capabilities capabilities){
  Capabilities modifiedCapabilities=capabilities;
  for (  CapabilitiesModifier modifier : capabilitiesModifiers) {
    modifiedCapabilities=modifier.modify(capabilities);
  }
  return modifiedCapabilities;
}

public Capabilities modifyCapabilities ( Capabilities capabilities ) { Capabilities modifiedCapabilities = capabilities ; for ( CapabilitiesModifier modifier : capabilitiesModifiers ) { modifiedCapabilities = modifier . modify ( capabilities ) ; } return modifiedCapabilities ; }
modifies provided capabilities with registered set of modifiers .
