com.esri.core.tasks.ags.geoprocessing
Class GPLinearUnit

java.lang.Object
  extended by com.esri.core.tasks.ags.geoprocessing.GPParameter
      extended by com.esri.core.tasks.ags.geoprocessing.GPLinearUnit
All Implemented Interfaces:
Serializable

public class GPLinearUnit
extends GPParameter

Container class representing a Geo-Processing parameter of the type linear unit.

See Also:
Serialized Form

Constructor Summary
GPLinearUnit()
          Constructs an empty GPLinearUnit object.
GPLinearUnit(String paramName)
          Constructor taking in the parameter name.
 
Method Summary
 boolean equals(Object obj)
           
 void fromJson(org.codehaus.jackson.JsonParser parser)
          Method used to populate a GP Parameter.
 String generateValueParams()
          Method serializing GP parameter's values into a Json format.
 double getDistance()
          Gets the distance value.
 String getUnits()
          Gets the units in string.
 int hashCode()
           
 void setDistance(double distance)
          Sets the distance value.
 void setUnits(String units)
          Sets the units in string.
 
Methods inherited from class com.esri.core.tasks.ags.geoprocessing.GPParameter
createFromJson, generateRequestParams, getDataType, getParamName, setParamName
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPLinearUnit

public GPLinearUnit(String paramName)
Constructor taking in the parameter name.

Parameters:
paramName - parameter name.

GPLinearUnit

public GPLinearUnit()
Constructs an empty GPLinearUnit object.

Method Detail

getDistance

public double getDistance()
Gets the distance value.

Returns:
the distance.

getUnits

public String getUnits()
Gets the units in string. Such as "esriMeters", "esriMiles", "esriKilometers" etc.

Returns:
the units.

setDistance

public void setDistance(double distance)
Sets the distance value.

Parameters:
distance - the distance to set.

setUnits

public void setUnits(String units)
Sets the units in string. Such as "esriMeters", "esriMiles", "esriKilometers" etc.

Parameters:
units - the units to set

generateValueParams

public String generateValueParams()
                           throws Exception
Description copied from class: GPParameter
Method serializing GP parameter's values into a Json format.

Specified by:
generateValueParams in class GPParameter
Returns:
the Json String containing the GP parameter's values.
Throws:
Exception

fromJson

public void fromJson(org.codehaus.jackson.JsonParser parser)
              throws Exception
Description copied from class: GPParameter
Method used to populate a GP Parameter.

Specified by:
fromJson in class GPParameter
Parameters:
parser - a Json Parser
Throws:
Exception

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2012. All Rights Reserved.