story.scheherazade.elements
Class TransitionTime

java.lang.Object
  extended by story.scheherazade.elements.TransitionTime
All Implemented Interfaces:
RenderableObject, TimelineTime

public class TransitionTime
extends java.lang.Object
implements RenderableObject, TimelineTime

A duple of StateTimes that together describe the time index of a Transition between two states.


Field Summary
static TransitionTime A_PRIORI_TRANSITION
           
static TransitionTime INTERP
           
static TransitionTime TRANSITION_0_1
           
 
Constructor Summary
TransitionTime(StateTime time1, StateTime time2)
           
TransitionTime(java.lang.String in)
           
 
Method Summary
 int compareByBoundedBegin(StateTime other)
           
 int compareByBoundedBegin(TimelineTime other)
           
 int compareByBoundedBegin(TransitionTime other)
          Orders two transition time by earliest bounded begin time.
 int compareByBoundedEnd(StateTime other)
           
 int compareByBoundedEnd(TimelineTime other)
           
 int compareByBoundedEnd(TransitionTime other)
          Orders two transition time by latest bounded end time.
 boolean equals(java.lang.Object other)
           
 boolean isCompletelyBounded()
           
 java.lang.StringBuffer render()
           
 java.lang.StringBuffer renderForHumans()
           
 boolean subsumesSlice(TransitionTime slice)
          Returns whether another transition time is a subset of (subsumed by) this one.
 StateTime time1()
           
 StateTime time2()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

A_PRIORI_TRANSITION

public static final TransitionTime A_PRIORI_TRANSITION

INTERP

public static final TransitionTime INTERP

TRANSITION_0_1

public static final TransitionTime TRANSITION_0_1
Constructor Detail

TransitionTime

public TransitionTime(StateTime time1,
                      StateTime time2)
               throws Scheherexception
Throws:
Scheherexception

TransitionTime

public TransitionTime(java.lang.String in)
               throws Scheherexception
Throws:
Scheherexception
Method Detail

time1

public StateTime time1()

time2

public StateTime time2()

isCompletelyBounded

public boolean isCompletelyBounded()

renderForHumans

public java.lang.StringBuffer renderForHumans()
Specified by:
renderForHumans in interface TimelineTime

render

public java.lang.StringBuffer render()
Specified by:
render in interface RenderableObject
Specified by:
render in interface TimelineTime

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Specified by:
equals in interface TimelineTime
Overrides:
equals in class java.lang.Object

compareByBoundedEnd

public int compareByBoundedEnd(TransitionTime other)
                        throws Scheherexception
Orders two transition time by latest bounded end time. If both ends are unbounded, picks latest start time. If one end is unbounded, returns whether the unbounded's start time is later than the bounded's end time. Useful for asking, "which of these two actions is verbalized last?"

Throws:
Scheherexception

compareByBoundedEnd

public int compareByBoundedEnd(StateTime other)
                        throws Scheherexception
Throws:
Scheherexception

compareByBoundedEnd

public int compareByBoundedEnd(TimelineTime other)
                        throws Scheherexception
Throws:
Scheherexception

compareByBoundedBegin

public int compareByBoundedBegin(TransitionTime other)
                          throws Scheherexception
Orders two transition time by earliest bounded begin time.

Throws:
Scheherexception

compareByBoundedBegin

public int compareByBoundedBegin(StateTime other)
                          throws Scheherexception
Throws:
Scheherexception

compareByBoundedBegin

public int compareByBoundedBegin(TimelineTime other)
                          throws Scheherexception
Throws:
Scheherexception

subsumesSlice

public boolean subsumesSlice(TransitionTime slice)
                      throws Scheherexception
Returns whether another transition time is a subset of (subsumed by) this one.

Throws:
Scheherexception


Copyright © 2011 David K. Elson. All Rights Reserved.