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

ProductDetails.java « purchase « maps « mapswithme « com « src « android - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 865467842dd19aec3a696cba46a759ec4f60932a (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package com.mapswithme.maps.purchase;

import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;

class ProductDetails implements Parcelable
{
  @NonNull
  private final String mProductId;
  private final float mPrice;
  @NonNull
  private final String mCurrencyCode;
  @NonNull
  private final String mTitle;

  ProductDetails(@NonNull String productId, float price, @NonNull String currencyCode, @NonNull
      String title)
  {
    mProductId = productId;
    mPrice = price;
    mCurrencyCode = currencyCode;
    mTitle = title;
  }

  private ProductDetails(Parcel in)
  {
    this(in.readString(), in.readFloat(), in.readString(), in.readString());
  }

  float getPrice()
  {
    return mPrice;
  }

  @NonNull
  String getCurrencyCode()
  {
    return mCurrencyCode;
  }

  @NonNull
  String getProductId()
  {
    return mProductId;
  }

  @NonNull
  public String getTitle()
  {
    return mTitle;
  }

  public static final Creator<ProductDetails> CREATOR = new Creator<ProductDetails>()
  {
    @Override
    public ProductDetails createFromParcel(Parcel in)
    {
      return new ProductDetails(in);
    }

    @Override
    public ProductDetails[] newArray(int size)
    {
      return new ProductDetails[size];
    }
  };

  @Override
  public int describeContents()
  {
    return 0;
  }

  @Override
  public void writeToParcel(Parcel dest, int flags)
  {
    dest.writeString(mProductId);
    dest.writeFloat(mPrice);
    dest.writeString(mCurrencyCode);
    dest.writeString(mTitle);
  }
}