Example usage for android.os Parcel readDouble

List of usage examples for android.os Parcel readDouble

Introduction

In this page you can find the example usage for android.os Parcel readDouble.

Prototype

public final double readDouble() 

Source Link

Document

Read a double precision floating point value from the parcel at the current dataPosition().

Usage

From source file:Main.java

public static Double readDoubleFromParcel(Parcel in) {
    return (in.readByte() != 0) ? in.readDouble() : null;
}

From source file:Main.java

public static Location readLocation(Parcel in) {
    Location loc = new Location(in.readString());
    loc.setTime(in.readLong());/*from ww  w. j  ava 2 s .com*/
    loc.setLatitude(in.readDouble());
    loc.setLongitude(in.readDouble());
    loc.setAltitude(in.readDouble());
    loc.setAccuracy(in.readFloat());
    loc.setBearing(in.readFloat());
    loc.setSpeed(in.readFloat());
    return loc;
}

From source file:org.opendatakit.database.queries.BindArgs.java

private static Object unmarshallObject(Parcel in) {
    int dataType = in.readInt();
    switch (dataType) {
    case 0:/*from  ww  w. j a va  2  s .  c o  m*/
        return null;
    case 1:
        return in.readString();
    case 2:
        return in.readInt();
    case 3:
        return Boolean.TRUE;
    case 4:
        return Boolean.FALSE;
    case 5:
        return in.readDouble();
    case 6:
        return in.readFloat();
    case 7:
        return in.readLong();
    default:
        throw new IllegalStateException("should have been prevented in constructor");
    }
}

From source file:com.clover.sdk.v3.JsonParcelHelper.java

private static Object readValue(Parcel in) {
    int type = in.readInt();

    switch (type) {
    case VAL_NULL:
        return JSONObject.NULL;

    case VAL_STRING:
        return in.readString();

    case VAL_INTEGER:
        return in.readInt();

    case VAL_MAP:
        return ObjectWrapper.CREATOR.createFromParcel(in).unwrap();

    case VAL_LONG:
        return in.readLong();

    case VAL_FLOAT:
        return in.readFloat();

    case VAL_DOUBLE:
        return in.readDouble();

    case VAL_BOOLEAN:
        return in.readInt() != 0;

    case VAL_OBJECTARRAY:
        return ArrayWrapper.CREATOR.createFromParcel(in).unwrap();

    default://from w w w . j  a v  a 2 s.  co m
        int off = in.dataPosition() - 4;
        throw new IllegalArgumentException(
                "Json: unmarshalling unknown type code " + type + " at offset " + off);
    }
}

From source file:com.tigerpenguin.places.model.PlaceLocation.java

public PlaceLocation(Parcel in) {
    latitude = in.readDouble();
    longitude = in.readDouble();
}

From source file:com.eTilbudsavis.etasdk.model.Size.java

private Size(Parcel in) {
    this.mFrom = in.readDouble();
    this.mTo = in.readDouble();
}

From source file:com.eTilbudsavis.etasdk.model.Dimension.java

private Dimension(Parcel in) {
    this.mWidth = in.readDouble();
    this.mHeight = in.readDouble();
}

From source file:com.playhaven.android.data.Reward.java

/**
 * Deserialize this object from a Parcel
 *
 * @param in parcel to read from/*  w w  w  . j ava  2 s  . co  m*/
 */
protected void readFromParcel(Parcel in) {
    quantity = in.readDouble();
    receipt = in.readDouble();
    tag = in.readString();
    signature = in.readString();
}

From source file:it_minds.dk.eindberetningmobil_android.models.GPSCoordinateModel.java

protected GPSCoordinateModel(Parcel in) {
    this.Latitude = in.readDouble();
    this.Longitude = in.readDouble();
    this.IsViaPoint = in.readByte() != 0;
}

From source file:com.eTilbudsavis.etasdk.model.Pricing.java

private Pricing(Parcel in) {
    this.mPrice = in.readDouble();
    this.mPrePrice = (Double) in.readValue(Double.class.getClassLoader());
    this.mCurrency = in.readString();
}