@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof PositionOrUnit)) return false;

        PositionOrUnit that = (PositionOrUnit) o;

        if (position != null ? !position.equals(that.position) : that.position != null) return false;
        if (unit != null ? !unit.equals(that.unit) : that.unit != null) return false;

        return true;
    }