|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.mit.csail.sdg.alloy4compiler.ast.Type.ProductType
public static final class Type.ProductType
Immutable; represents a list of PrimSig objects.
Invariant: "one of the sig in the list is NONE" iff "every sig in the list is NONE".
Note: the return value of every method is always valid for all time; for example, given ProductType A and B, and you call C=A.intersect(B), then the result C will always be the intersection of A and B even if the caller later constructs more sigs or subsigs or subsetsigs...
Method Summary | |
---|---|
int |
arity()
Returns the arity of this ProductType object. |
boolean |
equals(java.lang.Object that)
Returns true if this.arity==that.arity and this.types[i]==that.types[i] for each i |
Sig.PrimSig |
get(int i)
Returns a specific PrimSig in this ProductType |
int |
hashCode()
Returns a hash code consistent with equals() |
boolean |
isEmpty()
Returns true if this.arity==0 or this==NONE->..->NONE |
java.lang.String |
toString()
Returns the String representation of this ProductType object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object that)
equals
in class java.lang.Object
public int arity()
public Sig.PrimSig get(int i)
java.lang.ArrayIndexOutOfBoundsException
- if (i < 0) or (i >= arity)public boolean isEmpty()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |