public class TaskUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
encodeUrl(java.lang.String s)
Perform standard
application/x-www-urlencoded translation for string s . |
static java.util.List<Task> |
filterTasks(java.lang.String pattern,
java.util.List<? extends Task> tasks) |
static java.lang.String |
formatDate(java.util.Date date) |
static java.lang.String |
formatTask(Task task,
java.lang.String format) |
static java.lang.String |
getChangeListComment(Task task) |
static java.lang.String |
getChangeListComment(Task task,
boolean forCommit) |
static java.lang.String |
getTrimmedSummary(Task task) |
static java.util.Date |
parseDate(java.lang.String s) |
static void |
prettyFormatJsonToLog(Logger logger,
JsonElement json)
Parse and print pretty-formatted Json to
logger , if its level is DEBUG or below. |
static void |
prettyFormatJsonToLog(Logger logger,
java.lang.String json)
Parse and print pretty-formatted Json to
logger , if its level is DEBUG or below. |
static void |
prettyFormatXmlToLog(Logger logger,
Element element)
Print pretty-formatted XML to
logger , if its level is DEBUG or below. |
static boolean |
tasksEqual(java.util.List<? extends Task> tasks1,
java.util.List<? extends Task> tasks2) |
static boolean |
tasksEqual(Task [] task1,
Task [] task2) |
static boolean |
tasksEqual(Task t1,
Task t2)
Task.equals(Object) implementation compares tasks by their unique IDs only. |
public static java.lang.String formatTask(Task task, java.lang.String format)
public static java.lang.String getChangeListComment(Task task)
public static java.lang.String getChangeListComment(Task task, boolean forCommit)
public static java.lang.String getTrimmedSummary(Task task)
public static java.util.Date parseDate(java.lang.String s)
public static java.lang.String formatDate(java.util.Date date)
public static boolean tasksEqual(Task t1, Task t2)
Task.equals(Object)
implementation compares tasks by their unique IDs only.
This method should be used when full comparison is necessary.public static boolean tasksEqual(java.util.List<? extends Task> tasks1, java.util.List<? extends Task> tasks2)
public static void prettyFormatXmlToLog(Logger logger, Element element)
logger
, if its level is DEBUG or below.public static void prettyFormatJsonToLog(Logger logger, java.lang.String json)
logger
, if its level is DEBUG or below.public static void prettyFormatJsonToLog(Logger logger, JsonElement json)
logger
, if its level is DEBUG or below.public static java.lang.String encodeUrl(java.lang.String s)
application/x-www-urlencoded
translation for string s
.