class AggregatePreferencesAdder {

    public boolean add() {
        try {
            fragment.addPreferencesFromResource(R.xml.aggregate_preferences);
            return true;
        } catch (ClassCastException e) {
            Toast.makeText(fragment.getActivity(), R.string.corrupt_imported_preferences_error, Toast.LENGTH_LONG).show();
            return false;
        }
    }

      AggregatePreferencesAdder(PreferenceFragment fragment);

}