Skip to content
Snippets Groups Projects
Select Git revision
  • 0d5f9b4cffa67962953e6041e67ff4962eaa211d
  • main default protected
  • master
3 results

Point.java

Blame
  • Forked from LABOUREL Arnaud / formula Template
    11 commits behind the upstream repository.
    arnaudlabourel's avatar
    LABOUREL Arnaud authored
    0d227199
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Point.java 528 B
    package image;
    
    import java.util.Objects;
    
    /**
     * Created by Arnaud Labourel on 09/11/2018.
     */
    public class Point {
        public final int x, y;
    
        Point(int x, int y) {
            this.x = x;
            this.y = y;
        }
    
        @Override
        public final boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Point point)) return false;
            return x == point.x &&
                    y == point.y;
        }
    
        @Override
        public final int hashCode() {
            return Objects.hash(x, y);
        }
    
    
    }