edu.umd.cs.findbugs.gui2

Class Sortables

public class Sortables extends Enum<Sortables> implements Comparator<BugAspects.SortableValue>

A useful enum for dealing with all the types of filterable and sortable data in BugInstances This is the preferred way for getting the information out of a BugInstance and formatting it for display It also has the comparators for the different types of data

Author: Reuven

Field Summary
static SortablesBUGCODE
static SortablesCATEGORY
static SortablesCLASS
static SortablesDESIGNATION
static SortablesDIVIDER
static SortablesFIRSTVERSION
static SortablesLASTVERSION
static SortablesPACKAGE
static SortablesPRIORITY
static SortablesTYPE
static List<Sortables>VALUES
An immutable list containing the values comprising this enum class in the order they're declared.
Method Summary
intcompare(BugAspects.SortableValue one, BugAspects.SortableValue two)
List<Sortables>family()
Returns an immutable list containing the values comprising this enum class in the order they're declared.
StringformatValue(String value)
String[]getAll()
String[]getAll(BugSet set)
String[]getAllSorted()
String[]getAllSorted(BugSet set)
Comparator<BugLeafNode>getBugLeafNodeComparator()
abstract StringgetFrom(BugInstance bug)
static SortablesgetSortableByPrettyName(String name)
static SortablesvalueOf(String name)
Static factory to return the enum constant pertaining to the given string name.

Field Detail

BUGCODE

public static final Sortables BUGCODE

CATEGORY

public static final Sortables CATEGORY

CLASS

public static final Sortables CLASS

DESIGNATION

public static final Sortables DESIGNATION

DIVIDER

public static final Sortables DIVIDER

FIRSTVERSION

public static final Sortables FIRSTVERSION

LASTVERSION

public static final Sortables LASTVERSION

PACKAGE

public static final Sortables PACKAGE

PRIORITY

public static final Sortables PRIORITY

TYPE

public static final Sortables TYPE

VALUES

public static final List<Sortables> VALUES
An immutable list containing the values comprising this enum class in the order they're declared. This field may be used to iterate over the constants as follows:
for(Sortables c : Sortables.VALUES)
    System.out.println(c);

Method Detail

compare

public int compare(BugAspects.SortableValue one, BugAspects.SortableValue two)

family

public final List<Sortables> family()
Returns an immutable list containing the values comprising this enum class in the order they're declared. This instance method simply returns VALUES. Few programmers should have any need to use this method. It is provided for use by sophisticated enum-based data structures to prevent the need for reflective access to VALUES.

Returns: an immutable list containing the values comprising this enum class, in the order they're declared.

formatValue

public String formatValue(String value)

getAll

public String[] getAll()

getAll

public String[] getAll(BugSet set)

getAllSorted

public String[] getAllSorted()

getAllSorted

public String[] getAllSorted(BugSet set)

getBugLeafNodeComparator

public Comparator<BugLeafNode> getBugLeafNodeComparator()

getFrom

public abstract String getFrom(BugInstance bug)

getSortableByPrettyName

public static Sortables getSortableByPrettyName(String name)

valueOf

public static final Sortables valueOf(String name)
Static factory to return the enum constant pertaining to the given string name. The string must match exactly an identifier used to declare an enum constant in this type.

Throws: IllegalArgumentException if this enum class has no constant with the specified name.

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.