Back to project page ExpertAndroid.
The source code is released under:
MIT License
If you think the Android project ExpertAndroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package converters; //from ww w .j av a 2 s. co m import android.os.Parcel; import android.os.Parcelable; public class ValueField implements Parcelable { public static String FT_int = "Integer"; public static String FT_string = "String"; public static String FT_Object = "Object"; public static String FT_unknown = "Unknown"; //Add more field types later public String name; public String type; public ValueField(String inName, String inFieldType) { name = inName; type = inFieldType; } public static final Parcelable.Creator<ValueField> CREATOR = new Parcelable.Creator<ValueField>() { public ValueField createFromParcel(Parcel in) { return new ValueField(in); } public ValueField[] newArray(int size) { return new ValueField[size]; } }; //end of creator // @Override public int describeContents() { return 0; } public ValueField(Parcel in) { name = in.readString(); type = in.readString(); } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(name); dest.writeString(type); } public String toString() { return name + "/" + type; } public static ValueField getStringField(String fieldName) { return new ValueField(fieldName, ValueField.FT_string); } }//eof-class