-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add warnings and deprecate ackWarningsList and warningsList
- Loading branch information
James Robert Somers
committed
Mar 14, 2018
1 parent
2e0a3ed
commit 5a7309b
Showing
6 changed files
with
299 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...it-android-sdk/src/main/java/it/trade/android/sdk/model/TradeItWarningLinkParcelable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package it.trade.android.sdk.model; | ||
|
||
import android.os.Parcel; | ||
import android.os.Parcelable; | ||
|
||
import it.trade.model.reponse.WarningLink; | ||
|
||
public class TradeItWarningLinkParcelable implements Parcelable { | ||
protected String label; | ||
protected String url; | ||
|
||
TradeItWarningLinkParcelable(WarningLink link) { | ||
this.label = link.label; | ||
this.url = link.url; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
|
||
TradeItWarningLinkParcelable that = (TradeItWarningLinkParcelable) o; | ||
|
||
if (label != null ? !label.equals(that.label) : that.label != null) return false; | ||
return url != null ? url.equals(that.url) : that.url == null; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = label != null ? label.hashCode() : 0; | ||
result = 31 * result + (url != null ? url.hashCode() : 0); | ||
return result; | ||
} | ||
|
||
@Override | ||
public int describeContents() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public void writeToParcel(Parcel dest, int flags) { | ||
dest.writeString(this.label); | ||
dest.writeString(this.url); | ||
} | ||
|
||
protected TradeItWarningLinkParcelable(Parcel in) { | ||
this.label = in.readString(); | ||
this.url = in.readString(); | ||
} | ||
|
||
public static final Parcelable.Creator<TradeItWarningLinkParcelable> CREATOR = new Parcelable.Creator<TradeItWarningLinkParcelable>() { | ||
@Override | ||
public TradeItWarningLinkParcelable createFromParcel(Parcel source) { | ||
return new TradeItWarningLinkParcelable(source); | ||
} | ||
|
||
@Override | ||
public TradeItWarningLinkParcelable[] newArray(int size) { | ||
return new TradeItWarningLinkParcelable[size]; | ||
} | ||
}; | ||
} |
Oops, something went wrong.