Java Utililty Methods Second Get

List of utility methods to do Second Get

Description

The list of methods to do Second Get are organized into topic(s).

Method

StringgetSecondRulePart()
Returns the second part of the rule class code
return "\t\t\n" + "\t\tlocalStack.popLayer();       \n"
        + "\t\treturn (CompilerRuntime.UpdateList) evalStack.pop();\n" + "\t}\n";
intgetSeconds()
get Seconds
int seconds = (int) (System.currentTimeMillis() / 1000L);
return seconds;
doublegetSeconds(double coordinate)

Gets the (real-value) seconds component from a decimal coordinate.

return (((coordinate - getWholeDegrees(coordinate)) * 60) - getWholeMinutes(coordinate)) * 60;
StringgetSeconds(double seconds)
get Seconds
final int sec = (int) (Math.ceil(seconds % 60));
final StringBuffer sb = new StringBuffer();
if (sec >= 10) {
    sb.append(sec);
} else {
    sb.append(0);
    sb.append(sec);
return sb.toString();
doublegetSeconds(double t)
Returns full number of seconds for given double time value.
double tt = (t - getHours(t)) * 60;
tt = (tt - getMinutes(t)) * 60;
return Math.min(tt, 59.9);
doublegetSeconds(final double DEC_DEG)
get Seconds
return (((DEC_DEG - getDegrees(DEC_DEG)) * 60) - getMinutes(DEC_DEG)) * 60;
intgetSeconds(int minutes)
get Seconds
return minutes * 60;
intgetSeconds(String s)
get Seconds
int k;
if (s.length() == 1)
    return Integer.parseInt(s);
char u = s.charAt(s.length() - 1);
if (isInteger("" + u))
    return Integer.parseInt(s);
float f = Float.parseFloat(s.substring(0, s.length() - 1));
switch (u) {
...
intgetSeconds(String time)
get Seconds
String[] timeTmp = getTimeFromString(time);
return Integer.parseInt(timeTmp[2].substring(0, timeTmp[2].indexOf(".")));
intgetSeconds(String time, int defaultValue)
get Seconds
try {
    if (time == null || time.equals(""))
        return defaultValue;
    String[] str = time.split(":");
    if (str.length > 2)
        return new Integer(str[2]).intValue();
    else if (str.length == 1)
        return new Integer(str[0]).intValue();
...