summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/attribution/AttributionPlacement.java
blob: 1eedbb4f46d23fbe27ca6f44d9c4a9bd4f161f19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package com.mapbox.mapboxsdk.attribution;

import android.graphics.Bitmap;
import android.graphics.PointF;
import android.support.annotation.Nullable;

public class AttributionPlacement {

  private Bitmap logo;
  private PointF anchorPoint;

  public AttributionPlacement(@Nullable Bitmap logo, @Nullable PointF anchorPoint) {
    this.logo = logo;
    this.anchorPoint = anchorPoint;
  }

  public Bitmap getLogo() {
    return logo;
  }

  public PointF getAnchorPoint() {
    return anchorPoint;
  }

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

    AttributionPlacement that = (AttributionPlacement) o;

    if (logo != null ? !logo.equals(that.logo) : that.logo != null) {
      return false;
    }
    return anchorPoint != null ? anchorPoint.equals(that.anchorPoint) : that.anchorPoint == null;
  }

  @Override
  public int hashCode() {
    int result = logo != null ? logo.hashCode() : 0;
    result = 31 * result + (anchorPoint != null ? anchorPoint.hashCode() : 0);
    return result;
  }

  @Override
  public String toString() {
    return "AttributionPlacement{" +
      "logo=" + logo +
      ", anchorPoint=" + anchorPoint +
      '}';
  }
}