Methods Summary |
---|
public boolean | greaterThan(com.sun.perseus.model.Time cmp)Compares the input time with this instance.
The UNRESOLVED value is greater than any
other Time value. The INDEFINITE
value is greater than any resolved value.
A resolved time is greater than another resolved time
if its value is greater.
if (this == UNRESOLVED) {
return true;
} else if (this == INDEFINITE) {
if (cmp == UNRESOLVED) {
return false;
}
return true;
} else {
if (cmp == UNRESOLVED
||
cmp == INDEFINITE) {
return false;
}
return value >= cmp.value;
}
|
public boolean | isResolved()
return this != INDEFINITE && this != UNRESOLVED;
|
public boolean | isSameTime(com.sun.perseus.model.Time cmp)Checks if the input time is the same as this one.
if (cmp == null) {
return false;
}
if (cmp == this) {
return true;
}
if (cmp.value == value) {
return true;
}
return false;
|
public java.lang.String | toString()Debug
if (this == UNRESOLVED) {
return "Time[UNRESOLVED]";
} else if (this == INDEFINITE) {
return "Time[INDEFINITE]";
} else {
return "Time[RESOLVED, " + value + "]";
}
|
protected static java.lang.String | toStringTrait(com.sun.perseus.model.Time t)Converst a Time instance to a String trait value.
if (t == null || Time.INDEFINITE == t) {
return SVGConstants.SVG_INDEFINITE_VALUE;
}
// This should never happen because Times converted to traits
// are times specified on timed element attributes and should
// never be unresolved times.
if (Time.UNRESOLVED.isSameTime(t)) {
throw new IllegalArgumentException();
}
// At this point, we know we are dealing with a resolved time.
// Returns the value in seconds.
return (t.value / 1000f) + "s";
|