/** * Construct a new empty VehicleMessage. * * @param timestamp timestamp as milliseconds since unix epoch */ public VehicleMessage(Long timestamp) { setTimestamp(timestamp); }
/** * Construct a new VehicleMessage with the given extra data and an * overridden timestamp. */ public VehicleMessage(Long timestamp, Map<String, Object> extras) { this(extras); setTimestamp(timestamp); }
protected void readFromParcel(Parcel in) { // Not reading the derived class name as it is already pulled out of the // Parcel by the CREATOR. setTimestamp((Long)in.readValue(Long.class.getClassLoader())); //noinspection unchecked mExtras = (HashMap<String, Object>) in.readValue( HashMap.class.getClassLoader()); }