EPLHelpers.str() now takes varargs
This commit is contained in:
@ -1,3 +1,5 @@
|
|||||||
|
import java.util.StringJoiner;
|
||||||
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.joda.time.DateTimeComparator;
|
import org.joda.time.DateTimeComparator;
|
||||||
import org.joda.time.format.DateTimeFormat;
|
import org.joda.time.format.DateTimeFormat;
|
||||||
@ -14,6 +16,17 @@ public class EPLHelpers {
|
|||||||
private static DateTimeComparator timeComparator = DateTimeComparator.getTimeOnlyInstance();
|
private static DateTimeComparator timeComparator = DateTimeComparator.getTimeOnlyInstance();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple toString() wrapper.
|
||||||
|
*/
|
||||||
|
public static String str(Object... objects) {
|
||||||
|
StringJoiner sj = new StringJoiner(", ");
|
||||||
|
for (Object o : objects) {
|
||||||
|
sj.add(o != null ? o.toString() : "null");
|
||||||
|
}
|
||||||
|
return sj.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a DateTime object for the time. Should be specified in
|
* Return a DateTime object for the time. Should be specified in
|
||||||
* 24-hour "hh:mm" format.
|
* 24-hour "hh:mm" format.
|
||||||
@ -22,8 +35,6 @@ public class EPLHelpers {
|
|||||||
return timeFormatter.parseDateTime(time);
|
return timeFormatter.parseDateTime(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** A simple toString() wrapper for use in epl. */
|
|
||||||
public static String str(Object o) { return o.toString(); }
|
|
||||||
/**
|
/**
|
||||||
* Return true if the time portion of 'now' is between the time
|
* Return true if the time portion of 'now' is between the time
|
||||||
* portion of 'start' and 'end'.
|
* portion of 'start' and 'end'.
|
||||||
|
|||||||
Reference in New Issue
Block a user