(Parcel parcel)
| 2010 | } |
| 2011 | |
| 2012 | static Part readFrom(Parcel parcel) { |
| 2013 | int representation = parcel.readInt(); |
| 2014 | switch (representation) { |
| 2015 | case Representation.BOTH: |
| 2016 | return from(parcel.readString(), parcel.readString()); |
| 2017 | case Representation.ENCODED: |
| 2018 | return fromEncoded(parcel.readString()); |
| 2019 | case Representation.DECODED: |
| 2020 | return fromDecoded(parcel.readString()); |
| 2021 | default: |
| 2022 | throw new IllegalArgumentException("Unknown representation: " |
| 2023 | + representation); |
| 2024 | } |
| 2025 | } |
| 2026 | |
| 2027 | /** |
| 2028 | * Returns given part or {@link #NULL} if the given part is null. |
no test coverage detected