| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.isi.stella.Stella_Object
edu.isi.stella.Quantity
edu.isi.stella.DateTimeObject
edu.isi.stella.TimeDuration
public class TimeDuration
Representation of Relative Days and Time with the date represented as a number of days and the time in milliseconds.
| Field Summary | |
|---|---|
 int | 
days
 | 
 int | 
millis
 | 
| Constructor Summary | |
|---|---|
TimeDuration()
 | 
|
| Method Summary | |
|---|---|
static Stella_Object | 
accessTimeDurationSlotValue(TimeDuration self,
                            Symbol slotname,
                            Stella_Object value,
                            boolean setvalueP)
 | 
 Quantity | 
coerceTo(Stella_Object y)
 | 
 DecodedTimeDuration | 
decodeTimeDuration()
 | 
 boolean | 
greaterEqualP(Stella_Object t2)
 | 
 boolean | 
greaterP(Stella_Object t2)
 | 
 int | 
hashCode_()
Return a hash code for self (can be negative). | 
 boolean | 
lessEqualP(Stella_Object t2)
 | 
 boolean | 
lessP(Stella_Object t2)
 | 
static TimeDuration | 
makeTimeDuration(int days,
                 int millis)
 | 
static TimeDuration | 
newTimeDuration()
 | 
 boolean | 
objectEqlP(Stella_Object t2)
 | 
 Surrogate | 
primaryType()
Returns the primary type of self. | 
 void | 
printObject(java.io.PrintStream stream)
 | 
 void | 
printTimeDuration(java.io.PrintStream stream)
 | 
static TimeDuration | 
stringToTimeDuration(java.lang.String duration)
Parses and returns an time-duration object corresponding to duration. | 
static Stella_Object | 
timeDivide(TimeDuration t1,
           Stella_Object t2)
Divides the relative date t1 by t2. | 
 java.lang.String | 
timeDurationToString()
Returns a string representation of date | 
| Methods inherited from class edu.isi.stella.DateTimeObject | 
|---|
timeAdd, timeSubtract | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public int days
public int millis
| Constructor Detail | 
|---|
public TimeDuration()
| Method Detail | 
|---|
public static TimeDuration makeTimeDuration(int days,
                                            int millis)
public static TimeDuration stringToTimeDuration(java.lang.String duration)
duration.
 The syntax for time duration strings is "{plus|minus} N days[; M ms]" where N and M are
 integer values for days and milliseconds.  If no valid parse is found, null is returned.
duration - 
public static TimeDuration newTimeDuration()
public boolean greaterEqualP(Stella_Object t2)
greaterEqualP in class Quantitypublic boolean lessEqualP(Stella_Object t2)
lessEqualP in class Quantitypublic boolean greaterP(Stella_Object t2)
greaterP in class Quantitypublic boolean lessP(Stella_Object t2)
lessP in class Quantitypublic boolean objectEqlP(Stella_Object t2)
objectEqlP in class Stella_Object
public static Stella_Object timeDivide(TimeDuration t1,
                                       Stella_Object t2)
t1 by t2.  t2 must be
 either a relative date or a wrapped number.  If t2 is a relative date,
 then the return value will be a wrapped float.  If t2 is a wrapped number,
 then the reutrn value will be a relative date.
t1 - t2 - 
public DecodedTimeDuration decodeTimeDuration()
public void printTimeDuration(java.io.PrintStream stream)
public java.lang.String timeDurationToString()
date
public int hashCode_()
Stella_Objectself (can be negative).  Two objects that are eqlP
 are guaranteed to generate the same hash code.  Two objects that are not eqlP
 do not necessarily generate different hash codes.
hashCode_ in class Stella_Objectpublic Quantity coerceTo(Stella_Object y)
coerceTo in class Quantitypublic void printObject(java.io.PrintStream stream)
printObject in class Stella_Object
public static Stella_Object accessTimeDurationSlotValue(TimeDuration self,
                                                        Symbol slotname,
                                                        Stella_Object value,
                                                        boolean setvalueP)
public Surrogate primaryType()
Stella_Objectself.
 Gets defined automatically for every non-abstract subclass of OBJECT.
primaryType in class Stella_Object
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||