6 package com.vesoft.nebula.client.graph.data;
8 import com.vesoft.nebula.Coordinate;
9 import java.util.Arrays;
12 private final Coordinate coordinate;
15 this.coordinate = coordinate;
18 public double getX() {
19 return coordinate.getX();
22 public double getY() {
23 return coordinate.getY();
27 public boolean equals(Object o) {
31 if (o ==
null || getClass() != o.getClass()) {
35 return this.getX() == that.getX()
36 && this.getY() == that.getY();
40 public String toString() {
41 StringBuilder sb =
new StringBuilder();
42 sb.append(
"COORDINATE");
44 sb.append(coordinate.getX());
46 sb.append(coordinate.getY());
53 public int hashCode() {
54 return Arrays.deepHashCode(
new Object[] {this.getX(), this.getY()});