Package EDU.purdue.cs.bloat.editor
Class NameAndType
- java.lang.Object
-
- EDU.purdue.cs.bloat.editor.NameAndType
-
public class NameAndType extends java.lang.ObjectMethods and fields are described by their name and type descriptor. NameAndType represents exactly that.
-
-
Constructor Summary
Constructors Constructor Description NameAndType(java.lang.String name, Type type)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Check if an object is equal to this name and type.inthashCode()Returns a hash of the name and type.java.lang.Stringname()Returns the name.java.lang.StringtoString()Returns a string representation of the name and type.Typetype()Returns the type.
-
-
-
Constructor Detail
-
NameAndType
public NameAndType(java.lang.String name, Type type)Constructor.
-
-
Method Detail
-
name
public java.lang.String name()
Returns the name.
-
type
public Type type()
Returns the type.
-
toString
public java.lang.String toString()
Returns a string representation of the name and type.- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Check if an object is equal to this name and type.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- The object to compare against.- Returns:
- true if equal
-
hashCode
public int hashCode()
Returns a hash of the name and type.- Overrides:
hashCodein classjava.lang.Object
-
-