コード例 #1
0
 @Nullable
 public static ParcelableLocation fromGeoLocation(@Nullable GeoLocation geoLocation) {
   if (geoLocation == null) return null;
   final ParcelableLocation result = new ParcelableLocation();
   result.latitude = geoLocation.getLatitude();
   result.longitude = geoLocation.getLongitude();
   return result;
 }
コード例 #2
0
 public ParcelableLocation(@Nullable final GeoLocation location) {
   latitude = location != null ? location.getLatitude() : Double.NaN;
   longitude = location != null ? location.getLongitude() : Double.NaN;
 }