⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 criteria.java

📁 一套j2me的UI界面库
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
	/**
	 * Returns whether the location provider should be able to determine speed
	 * and course.
	 * 
	 * @return whether the location provider should be able to determine speed
	 *         and course. <code>true</code> means that it should be able, <code>false</code>
	 *         means that this is not required.
	 * @see #setSpeedAndCourseRequired(boolean)
	 */
	public boolean isSpeedAndCourseRequired ()
	{
		return speedAndCourseRequired;
	}

	/**
	 * Returns whether the location provider should be able to determine
	 * altitude.
	 * 
	 * @return whether the location provider should be able to determine
	 *         altitude. <code>true</code> means that it should be able, <code>false</code>
	 *         means that this is not required.
	 * @see #setAltitudeRequired(boolean)
	 */
	public boolean isAltitudeRequired ()
	{
		return altitudeRequired;
	}

	/**
	 * Returns whether the location provider should be able to determine textual
	 * address information.
	 * 
	 * @return whether the location provider should be able to normally provide
	 *         textual address information. <code>true</code> means that it should be
	 *         able, <code>false</code> means that this is not required.
	 * @see #setAddressInfoRequired(boolean)
	 */
	public boolean isAddressInfoRequired ()
	{
		return addressInfoRequired;
	}
	
	/**
	 * Returns if the LBS on this device should be used if it meets the
	 * other criteria.  Local LBS gets preference over any remote LBS specified
	 * by in <code>remoteDeviceAddress</code>.
	 * <p>
	 * If <code>false</code> only the remote LBS at <code>setRemoteDeviceAddress</code> can
	 * be used.
	 * 
	 * @return <code>true</code> if local LBS can be used; <code>false</code> if remote LBS
	 *  must be used.
	 */
	public boolean isLocalLBSAllowed ()
	{
		return allowLocalLBS;
	}
	
	/**
	 * Returns the Bluetooth address of the remote GPS device to use if no
	 * local LBS matches the other criteria.  If this is <code>null</code> than only
	 * local LBS can be used.
	 * 
	 * @return the URL of a remote LBS device.  Typically this is a Bluetooth
	 *  URL obtained from the <code>LocationProvider.discoverBluetoothDevices</code>
	 *  method.  If this is <code>null</code> than only local LBS will be used.
	 * @see #setRemoteDeviceAddress(String)
	 */
	public String getRemoteDeviceAddress ()
	{
		return remoteDeviceAddress;
	}

	/**
	 * Sets the desired horizontal accuracy preference. Accuracy is measured in
	 * meters. The preference indicates maximum allowed typical 1-sigma standard
	 * deviation for the location method. Default is <code>NO_REQUIREMENT</code>,
	 * meaning no preference on horizontal accuracy.
	 * 
	 * @param accuracy - the preferred horizontal accuracy in meters
	 * @see #getHorizontalAccuracy()
	 */
	public void setHorizontalAccuracy (int accuracy)
	{
		this.horizontalAccuracy = accuracy;
	}

	/**
	 * Sets the desired vertical accuracy preference. Accuracy is measured in
	 * meters. The preference indicates maximum allowed typical 1-sigma standard
	 * deviation for the location method. Default is NO_REQUIREMENT, meaning no
	 * preference on vertical accuracy.
	 * 
	 * @param accuracy - the preferred vertical accuracy in meters
	 * @see #getVerticalAccuracy()
	 */
	public void setVerticalAccuracy (int accuracy)
	{
		this.verticalAccuracy = accuracy;
	}

	/**
	 * Sets the desired maximum response time preference. This value is
	 * typically used by the implementation to determine a location method that
	 * typically is able to produce the location information within the defined
	 * time. Default is <code>NO_REQUIREMENT</code>, meaning no response time
	 * constraint.
	 * 
	 * @param time - the preferred time constraint and timeout value in
	 *        milliseconds
	 * @see #getPreferredResponseTime()
	 */
	public void setPreferredResponseTime (int time)
	{
		this.maxResponseTime = time;
	}

	/**
	 * Sets the preferred maximum level of power consumption.
	 * <p>
	 * These levels are inherently indeterminable and depend on many factors. It
	 * is the judgement of the implementation that defines a positioning method
	 * as consuming low power or high power. Default is <code>NO_REQUIREMENT</code>,
	 * meaning power consumption is not a quality parameter.
	 * 
	 * @param level - the preferred maximum level of power consumption. Should
	 *        be one of <code>NO_REQUIREMENT</code>, <code>POWER_USAGE_LOW</code>,
	 *        <code>POWER_USAGE_MEDIUM</code>, <code>POWER_USAGE_HIGH</code>.
	 * @see #getPreferredPowerConsumption()
	 */
	public void setPreferredPowerConsumption (int level)
	{
		this.powerConsumption = level;
	}

	/**
	 * Sets the preferred cost setting.
	 * <p>
	 * Sets whether the requests for location determination is allowed to incur
	 * any financial cost to the user of the terminal.
	 * <p>
	 * The default is true, i.e. the method is allowed to cost.
	 * <p>
	 * Note that the platform implementation may not always be able to know if a
	 * location method implies cost to the end user or not. If the
	 * implementation doesn't know, it MUST assume that it may cost. When this
	 * criteria is set to false, the implementation may only return a
	 * <code>LocationProvider</code> of which it is certain that using it for
	 * determining the location does not cause a per usage cost to the end user.
	 * 
	 * @param costAllowed - <code>false</code> if location determination is not
	 *        allowed to cost, <code>true</code> if it is allowed to cost
	 * @see #isAllowedToCost()
	 */
	public void setCostAllowed (boolean costAllowed)
	{
		this.costAllowed = costAllowed;
	}

	/**
	 * Sets whether the location provider should be able to determine speed and
	 * course. Default is <code>false</code>.
	 * 
	 * @param speedAndCourseRequired - if set to <code>true</code>, the
	 *        <code>LocationProvider</code> is required to be able to normally
	 *        determine the speed and course. if set the <code>false</code>, the
	 *        speed and course are not required.
	 * @see #isSpeedAndCourseRequired()
	 */
	public void setSpeedAndCourseRequired (boolean speedAndCourseRequired)
	{
		this.speedAndCourseRequired = speedAndCourseRequired;
	}

	/**
	 * Sets whether the location provider should be able to determine altitude.
	 * <p>
	 * Default is <code>false</code>.
	 * 
	 * @param altitudeRequired - if set to <code>true</code>, the <code>LocationProvider</code>
	 *        is required to be able to normally determine the altitude if set
	 *        the <code>false</code>, the altitude is not required.
	 * @see #isAltitudeRequired()
	 */
	public void setAltitudeRequired (boolean altitudeRequired)
	{
		this.altitudeRequired = altitudeRequired;
	}

	/**
	 * Sets whether the location provider should be able to determine textual
	 * address information. Setting this criteria to <code>true</code> implies that a
	 * location provider should be selected that is capable of providing the
	 * textual address information. This does not mean that every returned
	 * location instance necessarily will have all the address information
	 * filled in, though.
	 * <p>
	 * Default is <code>false</code>.
	 * 
	 * @param addressInfoRequired - if set to <code>true</code>, the
	 *        <code>LocationProvider</code> is required to be able to normally
	 *        determine the textual address information. If set the <code>false</code>,
	 *        the textual address information is not required.
	 * @see #isAddressInfoRequired()
	 */
	public void setAddressInfoRequired (boolean addressInfoRequired)
	{
		this.addressInfoRequired = addressInfoRequired;
	}
	
	/**
	 * Sets if the LBS on this device should be used if it meets the
	 * other criteria.  Local LBS gets preference over any remote LBS specified
	 * by in <code>remoteDeviceAddress</code>.
	 * <p>
	 * To force remote LBS to be used set this value to <code>false</code> and provide
	 * a remote address to <code>setRemoteDeviceAddress</code>.
	 * <p>
	 * Default is <code>true</code>.
	 * 
	 * @param allowLocalLBS when <code>true</code> uses LBS on the current device
	 *  if it meets the other criteria; when <code>false</code> forces remote LBS
	 *  to be used.
	 */
	public void setAllowLocalLBS (boolean allowLocalLBS)
	{
		this.allowLocalLBS = allowLocalLBS;
	}
	
	/**
	 * Sets the Bluetooth address of the remote GPS device.  This address
	 * can be obtained from the <code>LocationProvider.discoverBluetoothDevices</code>
	 * method.  Once the address is known, it should be stored using the
	 * Record Management System (RMS) for the next time the MIDlet is run.
	 * If this value is set to <code>null</code>, the default, than only LBS providers
	 * built into the device running the MIDlet will be used. 
	 * 
	 * @param address - the Bluetooth address of the remote GPS device or
	 *  <code>null</code> if only local LBS can be used.
	 * @see #getRemoteDeviceAddress
	 */
	public void setRemoteDeviceAddress (String address)
	{
		this.remoteDeviceAddress = address;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -