Class Coordinate
- java.lang.Object
 - 
- ptolemy.domains.csp.demo.DiningPhilosophers.Coordinate
 
 
- 
public class Coordinate extends java.lang.Object 
- 
- 
Constructor Summary
Constructors Constructor Description Coordinate()Constructs a new Coordinate initialized as the origin (0, 0).Coordinate(int x, int y)Constructs a new Coordinate with the specified values. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Tests another object for equality with this instance.inthashCode()Return a hash code value for this Coordinate.java.lang.StringtoString()Returns a string representation of the Coordinate in the form "(X, Y)". 
 - 
 
- 
- 
Method Detail
- 
equals
public boolean equals(java.lang.Object o)
Tests another object for equality with this instance.- Overrides:
 equalsin classjava.lang.Object- Returns:
 - whether it is equal or not.
 
 
- 
hashCode
public int hashCode()
Return a hash code value for this Coordinate. This method returns the bitwise and of the X and Y integer values.- Overrides:
 hashCodein classjava.lang.Object- Returns:
 - A hash code value for this Coordinate
 
 
- 
toString
public java.lang.String toString()
Returns a string representation of the Coordinate in the form "(X, Y)".- Overrides:
 toStringin classjava.lang.Object- Returns:
 - a string representation of the Coordinates.
 
 
 - 
 
 -