Class CodeStream.Signature
- java.lang.Object
-
- ptolemy.cg.kernel.generic.program.CodeStream.Signature
-
- All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>
- Enclosing class:
- CodeStream
public static class CodeStream.Signature extends java.lang.Object implements java.lang.Comparable<java.lang.Object>Inner class for representing a code block signature.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringfunctionNameThe code block name.intnumParametersThe number of parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object object)Compare this signature to the given object by comparing their string representation lexicographically.booleanequals(java.lang.Object object)Return true if the given object is equal to this signature.inthashCode()Return the hash code for this channel.java.lang.StringtoString()Return the string format of this code block signature.
-
-
-
Method Detail
-
compareTo
public int compareTo(java.lang.Object object)
Compare this signature to the given object by comparing their string representation lexicographically. Each signature has an unique string representation (SeetoString()).- Specified by:
compareToin interfacejava.lang.Comparable<java.lang.Object>- Parameters:
object- The given object.- Returns:
- A negative integer if this signature precedes the given object, or a positive integer if the given object precedes this signature. Otherwise, it returns the value zero, which indicates that they are equal.
-
equals
public boolean equals(java.lang.Object object)
Return true if the given object is equal to this signature.- Overrides:
equalsin classjava.lang.Object- Parameters:
object- The given object.- Returns:
- true if the given object is equal to this signature, otherwise false.
-
hashCode
public int hashCode()
Return the hash code for this channel. Implementing this method is required for comparing the equality of channels.- Overrides:
hashCodein classjava.lang.Object- Returns:
- Hash code for this channel.
-
toString
public java.lang.String toString()
Return the string format of this code block signature.- Overrides:
toStringin classjava.lang.Object
-
-