Can I get custom fields of particular custom field type using Jira's java api?

I have a custom field type and want to get custom fields of that type on an issue.
Currently I have to iterate over all custom fields on the issue like …

Collection<CustomField> customFields = customFieldManager.getCustomFieldObjects(issue);
for (CustomField cf : customFields) {
    if (cf.getCustomFieldType().getKey().equals("pluginpath:typekey")) {
        //requred type custom field
    }
}

Is there any better way of doing this ?

You could get your desired CustomField object and use Issue#getCustomFieldValue().