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.String
functionName
The code block name.int
numParameters
The number of parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(java.lang.Object object)
Compare this signature to the given object by comparing their string representation lexicographically.boolean
equals(java.lang.Object object)
Return true if the given object is equal to this signature.int
hashCode()
Return the hash code for this channel.java.lang.String
toString()
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:
compareTo
in 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:
equals
in 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:
hashCode
in 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:
toString
in classjava.lang.Object
-
-