Welcome to mirror list, hosted at ThFree Co, Russian Federation.

BannerKey.java « ads « maps « mapswithme « com « src « android - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 337dfb0e5e050af5f36bf918ede85409282d05ff (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
package com.mapswithme.maps.ads;

import android.support.annotation.NonNull;

import net.jcip.annotations.Immutable;

@Immutable
class BannerKey
{
  @NonNull
  private final String mProvider;
  @NonNull
  private final String mId;

  BannerKey(@NonNull String provider, @NonNull String id)
  {
    mProvider = provider;
    mId = id;
  }

  @Override
  public String toString()
  {
    return "BannerKey{" +
           "mProvider='" + mProvider + '\'' +
           ", mId='" + mId + '\'' +
           '}';
  }

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

    BannerKey bannerKey = (BannerKey) o;

    if (!mProvider.equals(bannerKey.mProvider)) return false;
    return mId.equals(bannerKey.mId);
  }

  @Override
  public int hashCode()
  {
    int result = mProvider.hashCode();
    result = 31 * result + mId.hashCode();
    return result;
  }
}