Class NameAndType

java.lang.Object
EDU.purdue.cs.bloat.editor.NameAndType

public class NameAndType extends Object
Methods and fields are described by their name and type descriptor. NameAndType represents exactly that.
  • Constructor Details

    • NameAndType

      public NameAndType(String name, Type type)
      Constructor.
  • Method Details

    • name

      public String name()
      Returns the name.
    • type

      public Type type()
      Returns the type.
    • toString

      public String toString()
      Returns a string representation of the name and type.
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Check if an object is equal to this name and type.
      Overrides:
      equals in class 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:
      hashCode in class Object