public class

CustomFieldComparators

extends Object
java.lang.Object
   ↳ com.atlassian.jira.issue.comparator.CustomFieldComparators

Class Overview

Utility class for dealing with custom fields.

Summary

Public Constructors
CustomFieldComparators()
Public Methods
static Comparator<GenericValue> byGvName()
Returns a comparator that compares custom field GenericValue instances by name.
static Comparator<CustomField> byName()
Returns a comparator that compares CustomField instances by name.
static Comparator<CustomField> byTranslatedName(Locale locale, TranslationManager translationManager)
Returns a comparator that compares CustomField instances by the translated customfield name, using the supplied locale.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public CustomFieldComparators ()

Public Methods

public static Comparator<GenericValue> byGvName ()

Returns a comparator that compares custom field GenericValue instances by name.

Returns
  • a Comparator<GenericValue>

public static Comparator<CustomField> byName ()

Returns a comparator that compares CustomField instances by name. This is sorted by the customfield's untranslated name to preserve existing behaviour.

Returns
  • a Comparator<CustomField>

public static Comparator<CustomField> byTranslatedName (Locale locale, TranslationManager translationManager)

Returns a comparator that compares CustomField instances by the translated customfield name, using the supplied locale.

Parameters
locale The locale to use for comparison
translationManager The translation manger component
Returns
  • a Comparator<CustomField>