position.setBearing(Float.parseFloat(vehicleData.getHeading())); if (vehicleData.getSpeed() != null) position.setSpeed(Float.parseFloat(vehicleData.getSpeed()));
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Position other) { if (other == com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance()) return this; if (other.hasLatitude()) { setLatitude(other.getLatitude()); } if (other.hasLongitude()) { setLongitude(other.getLongitude()); } if (other.hasBearing()) { setBearing(other.getBearing()); } if (other.hasOdometer()) { setOdometer(other.getOdometer()); } if (other.hasSpeed()) { setSpeed(other.getSpeed()); } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(com.google.transit.realtime.GtfsRealtime.Position other) { if (other == com.google.transit.realtime.GtfsRealtime.Position.getDefaultInstance()) return this; if (other.hasLatitude()) { setLatitude(other.getLatitude()); } if (other.hasLongitude()) { setLongitude(other.getLongitude()); } if (other.hasBearing()) { setBearing(other.getBearing()); } if (other.hasOdometer()) { setOdometer(other.getOdometer()); } if (other.hasSpeed()) { setSpeed(other.getSpeed()); } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; }