Class Variable

java.lang.Object
dev.roanh.gmark.query.Variable
All Implemented Interfaces:
IDable

public class Variable extends Object implements IDable
Represents a query variable.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private int
    The numerical ID of this variable.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Variable(int id)
    Constructs a new variable with the given unique numerical ID.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
     
    int
    Gets the unique ID for this object.
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • id

      private int id
      The numerical ID of this variable.
  • Constructor Details

    • Variable

      public Variable(int id)
      Constructs a new variable with the given unique numerical ID.
      Parameters:
      id - The ID of this variable.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • getID

      public int getID()
      Description copied from interface: IDable
      Gets the unique ID for this object. This ID uniquely identifies all objects of this type.
      Specified by:
      getID in interface IDable
      Returns:
      The unique ID for this object.