libpit - Personal Issue Tracker core libraries (Filter, Issue, Project, Category) pit-cli - Command Line Interface (CLI) to libpit pit-swing - Graphical, Swing interface to libpit (built using Griffon) libpit and pit-swing both build, though pit-swing is just an empty griffon poject.
15 lines
330 B
Groovy
15 lines
330 B
Groovy
package com.jdbernard.pit
|
|
|
|
public enum Category {
|
|
BUG,
|
|
FEATURE,
|
|
TASK,
|
|
CLOSED
|
|
|
|
public static Category toCategory(String s) {
|
|
for(c in Category.values())
|
|
if (c.toString().startsWith(s.toUpperCase())) return c
|
|
throw new IllegalArgumentException("No category matches ${s}.")
|
|
}
|
|
}
|