FileDocCategorySizeDatePackage
TimeCondition.javaAPI DocphoneME MR2 API (J2ME)3366Wed May 02 18:00:34 BST 2007com.sun.perseus.model

TimeCondition

public abstract class TimeCondition extends Object
A TimeCondition represents a value in a TimedElementSupport begin or end conditions list.
version
$Id: TimeCondition.java,v 1.2 2006/04/21 06:39:19 st125089 Exp $

Fields Summary
boolean
isBegin
Controls whether this condition is part of a begin or end list
TimedElementSupport
timedElement
The associated TimedElement
Constructors Summary
public TimeCondition(TimedElementSupport timedElement, boolean isBegin)
As a result of constructing a new TimeCondition, the condition is added to the associated TimedElementSupport's begin or end list of conditions.

param
timedElement the associated TimedElementSupport. Should not be null.
param
isBegin defines whether this condition is for a begin list.

        if (timedElement == null) {
            throw new NullPointerException();
        }

        this.timedElement = timedElement;
        this.isBegin = isBegin;

        timedElement.addTimeCondition(this);
    
Methods Summary
protected static java.lang.StringtoStringTrait(java.util.Vector v)
Converts a vector of TimeCondition instances to a string trait value.

param
v the TimeCondition vector to convert. Should not be null. This should be called with a TimedElementSupport begin or end condition vector, which should never be null.
return
the string trait value.

        final int n = v.size();
        StringBuffer sb = new StringBuffer();
        
        for (int i = 0; i < n - 1; i++) {
            TimeCondition tc = (TimeCondition) v.elementAt(i);
            sb.append(tc.toStringTrait());
            sb.append(SVGConstants.SEMI_COLON);
        }

        sb.append(((TimeCondition) v.elementAt(n - 1)).toStringTrait());
        return sb.toString();
    
protected abstract java.lang.StringtoStringTrait()
Converts this TimeCondition to a String trait.

return
a string describing this TimeCondition