Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public enum Type implements Parcelable {
- first(0), second(1), third(2), fourth(3), fifth(4);
- private int type;
- Type(int type) {
- this.type = type;
- }
- public int type() {
- return type;
- }
- @Override
- public int describeContents() {
- return 0;
- }
- @Override
- public void writeToParcel(final Parcel dest, final int flags) {
- dest.writeInt(ordinal());
- }
- public static final Creator<Type> CREATOR = new Creator<Type>() {
- @Override
- public Type createFromParcel(final Parcel source) {
- return Type.values()[source.readInt()];
- }
- @Override
- public Type[] newArray(final int size) {
- return new Type[size];
- }
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement