class DistanceEntity {

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DistanceEntity that = (DistanceEntity) o;
        return key.equals(that.key) &&
                distance.equals(that.distance);
    }

    protected  DistanceEntity();
      DistanceEntity(DistanceKey key, Long distance);

}