Package ptolemy.domains.ptides.kernel
Class Tag
- java.lang.Object
-
- ptolemy.domains.ptides.kernel.Tag
-
- All Implemented Interfaces:
java.lang.Comparable
public class Tag extends java.lang.Object implements java.lang.ComparableA timestamp and a microstamp that represent a Tag.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Jia Zou
- Pt.AcceptedRating:
- Red (jiazou)
- Pt.ProposedRating:
- Yellow (jiazou)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object other)Compare a tag with another.booleanequals(java.lang.Object arg0)Checks if this tag is the same as another.inthashCode()Hashcode for this class.java.lang.StringtoString()Return a string representation of this class.
-
-
-
Field Detail
-
timestamp
public Time timestamp
The timestamp.
-
microstep
public int microstep
The microstep.
-
-
Constructor Detail
-
Tag
public Tag(Time timestamp, int microstep)
Construct a Tag.- Parameters:
timestamp- The timestamp.microstep- The microstep.
-
Tag
public Tag()
Construct an empty Tag.
-
-
Method Detail
-
compareTo
public int compareTo(java.lang.Object other)
Compare a tag with another.- Specified by:
compareToin interfacejava.lang.Comparable- Parameters:
other- The object to be compared.- Returns:
- The result of the comparison, which is a lexicographical order with the timestamp as the first element and microstep as the second.
-
equals
public boolean equals(java.lang.Object arg0)
Checks if this tag is the same as another.- Overrides:
equalsin classjava.lang.Object- Parameters:
arg0- The object checking against.- Returns:
- true if the tags are equal.
-
hashCode
public int hashCode()
Hashcode for this class.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashcode for this class.
-
toString
public java.lang.String toString()
Return a string representation of this class.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of this class.
-
-