Checks if the specified longitude is correct.

@param name the name of the longitude field
@param longitude the value of the longitude field
@return the longitude
978389
public static Double checkLongitude(String name, Double longitude) {
        if (longitude == null) {
            throw new IndexException("{} required", name);
        } else if (longitude < MIN_LONGITUDE || longitude > MAX_LONGITUDE) {
            throw new IndexException("{} must be in range [{}, {}], but found {}",
                                     name,
                                     MIN_LONGITUDE,
                                     MAX_LONGITUDE,
                                     longitude);
        }
        return longitude;
    }
1373402
public Object getValue(@NonNull String name) {
        if (name == null) { throw new IllegalArgumentException("name cannot be null."); }
        return map.get(name);
    }
247874
public String get_string_value(String name) {
        //  Check if datum exists for name
        DbDatum datum = datum(name);
        if (datum == null)
            return null;

        //  Else get string value
        String[] array = datum.extractStringArray();
        String str = "";
        for (int i = 0; i < array.length; i++) {
            str += array[i];
            if (i < array.length - 1)
                str += "\n";
        }
        return str;
    }
58645
public static double longitudeDiff(double a, double b) {
        a = to180(a);
        b = to180(b);
        return Math.abs(to180(a - b));
    }
227428
public String getFieldValue(String name) {
        String field = (String)fields.get(name);
        if (field == null) {
            return null;
        }
        else {
        	return field;
        }
    }
82255
def longitude(value):
    
    lon = round(float_(value), 5)
    if lon > 180.:
        raise ValueError('longitude %s > 180' % lon)
    elif lon < -180.:
        raise ValueError('longitude %s < -180' % lon)
    return lon
321404
private static Double readLongitude(Object o) {
        if (o == null) {
            return null;
        }
        Double value;
        if (o instanceof Number) {
            value = ((Number) o).doubleValue();
        } else {
            try {
                value = Double.valueOf(o.toString());
            } catch (NumberFormatException e) {
                throw new IndexException("Unparseable longitude: {}", o);
            }
        }
        return GeospatialUtils.checkLongitude("longitude", value);
    }
146744
def longitude_field_name(self):
        
        if self._lon_field_name is None:
            self._lon_field_name = self.name + '_lon'
        return self._lon_field_name
1342879
public boolean getForecast(String LATITUDE, String LONGITUDE) {


		try {
			String reply = httpGET( urlBuilder(LATITUDE, LONGITUDE) );
			if(reply == null)
				return false;
			this.forecast = Json.parse(reply).asObject();
			//this.forecast = JsonObject.readFrom(reply);
		} catch (NullPointerException e) {
			System.err.println("Unable to connect to the API: "+e.getMessage());
			return false;
		}

		return getForecast(this.forecast);


	}
351154
protected IStatus validateNameAgainstOtherSREs(String name) {
		IStatus nameStatus = SARLEclipsePlugin.getDefault().createOkStatus();
		if (isDuplicateName(name)) {
			nameStatus = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR,
					ISREInstall.CODE_NAME,
					Messages.SREInstallWizard_1);
		} else {
			final IStatus status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE);
			if (!status.isOK()) {
				nameStatus = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR,
						ISREInstall.CODE_NAME,
						MessageFormat.format(Messages.SREInstallWizard_2, status.getMessage()));
			}
		}
		return nameStatus;
	}
640452
public boolean isValid() {
        return StringUtils.isNotBlank(this.latitude) && StringUtils.isNotBlank(this.longitude)
            && StringUtils.isNotBlank(this.accuracy) && StringUtils.isNotBlank(this.timestamp);
    }
51924
function(ll) {
        var equals = false;
        if (ll != null) {
            equals = ((this.lon == ll.lon && this.lat == ll.lat) ||
                      (isNaN(this.lon) && isNaN(this.lat) && isNaN(ll.lon) && isNaN(ll.lat)));
        }
        return equals;
    }
1242959
public static <T> T getValue( Object object, String name )
	{
		return propertyValues.getValue(object, name);
	}
310176
def longitude(self, value):
        """"""
        self._longitude = math.radians(float(value))

        # update time_zone
        if abs((value / 15.0) - self.time_zone) > 1:
            # if time_zone doesn't match the longitude update the time_zone
            self.time_zone = value / 15.0
157445
public MarkPoint geoCoord(String name, String x, String y) {
        this.geoCoord().put(name, x, y);
        return this;
    }
342285
@Override
    public int compareTo( GeoPt o ) {
        int latResult = ((Float) latitude).compareTo( o.latitude );
        if ( latResult != 0 ) {
            return latResult;
        }
        return ((Float) longitude).compareTo( o.longitude );
    }
1132263
public boolean valueExists(String name) {
        IntByReference pType, lpcbData;
        byte[] lpData = new byte[1];

        pType = new IntByReference();
        lpcbData = new IntByReference();

        OUTER:
        while(true) {
            int r = Advapi32.INSTANCE.RegQueryValueEx(handle, name, null, pType, lpData, lpcbData);
            switch(r) {
            case WINERROR.ERROR_MORE_DATA:
                lpData = new byte[lpcbData.getValue()];
                continue OUTER;
            case WINERROR.ERROR_FILE_NOT_FOUND:
                return false;
            case WINERROR.ERROR_SUCCESS:
                return true;
            default:
                throw new JnaException(r);
            }
        }
    }