|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mit.csail.sdg.alloy4viz.AlloyAtom
public final class AlloyAtom
Immutable; represents an Alloy atom in an instance.
Thread Safety: Can be called only by the AWT event thread.
| Constructor Summary | |
|---|---|
AlloyAtom(AlloyType type,
int index)
Create a new AlloyAtom with the given type and index. |
|
AlloyAtom(AlloyType type,
int index,
java.lang.String originalName)
Create a new AlloyAtom with the given type, index, and label. |
|
| Method Summary | |
|---|---|
int |
compareTo(AlloyAtom otherAtom)
Compare first by type, then by index, then by the original names. |
boolean |
equals(java.lang.Object other)
Two AlloyAtoms are equal if they have the same type, same index, and same original name. |
AlloyType |
getType()
Return the type of the AlloyAtom. |
java.lang.String |
getVizName(VizState theme,
boolean numberAtoms)
Return a label for this atom as recommended by a theme (theme can be null if there's no theme to consult). |
int |
hashCode()
Returns a hash code based on the type and index. |
java.lang.String |
toString()
Provides a human-readable label for debugging purpose. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AlloyAtom(AlloyType type,
int index)
public AlloyAtom(AlloyType type,
int index,
java.lang.String originalName)
| Method Detail |
|---|
public java.lang.String getVizName(VizState theme,
boolean numberAtoms)
public AlloyType getType()
public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(AlloyAtom otherAtom)
As a special cosmetic enhancement: if we're comparing integer atoms, we want to ignore the difference between seqInt and Int.
compareTo in interface java.lang.Comparable<AlloyAtom>public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||