Class ClosestFacilityResult
- java.lang.Object
-
- com.esri.arcgisruntime.tasks.networkanalysis.ClosestFacilityResult
-
public final class ClosestFacilityResult extends java.lang.Object
Represents the result ofClosestFacilityTask.solveClosestFacilityAsync(ClosestFacilityParameters)
. The result is a collection of computed closest facility routes, barriers used in the computation, and messages generated during the process.- Since:
- 100.1.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDirectionsLanguage()
Gets the language used when computing directions.java.util.List<Facility>
getFacilities()
Gets a list of the facilities used to calculate the closest facility.java.util.List<java.lang.Double>
getFacilityCosts(java.lang.String attributeName, int facilityIndex)
Gets the total cost values for a given accumulate attribute and facility.java.util.List<Incident>
getIncidents()
Gets a list of the the incidents from which to calculate the closest facility.java.util.List<java.lang.String>
getMessages()
Gets the informational messages that were generated while computing closest facility routes.java.util.List<PointBarrier>
getPointBarriers()
Gets the point barriers used in the closest facility route computation.java.util.List<PolygonBarrier>
getPolygonBarriers()
Gets the polygon barriers used in the closest facility route computation.java.util.List<PolylineBarrier>
getPolylineBarriers()
Gets the polyline barriers used in the closest facility route computation.java.util.List<java.lang.Integer>
getRankedFacilityIndexes(int incidentIndex)
Gets a list of facility indexes for given incident where index is rank level and value is facility index.ClosestFacilityRoute
getRoute(int facilityIndex, int incidentIndex)
Gets the closest facility route by facility and incident indexes.
-
-
-
Method Detail
-
getFacilities
public java.util.List<Facility> getFacilities()
Gets a list of the facilities used to calculate the closest facility.- Returns:
- an unmodifiable list of the facilities
- Since:
- 100.1.0
- See Also:
ClosestFacilityParameters.setFacilities(Iterable)
,ClosestFacilityParameters.setFacilities(ArcGISFeatureTable, QueryParameters)
-
getIncidents
public java.util.List<Incident> getIncidents()
Gets a list of the the incidents from which to calculate the closest facility.- Returns:
- an unmodifiable list of the incidents
- Since:
- 100.1.0
- See Also:
ClosestFacilityParameters.setIncidents(Iterable)
,ClosestFacilityParameters.setIncidents(ArcGISFeatureTable, QueryParameters)
-
getPointBarriers
public java.util.List<PointBarrier> getPointBarriers()
Gets the point barriers used in the closest facility route computation. Only available ifClosestFacilityParameters.setReturnPointBarriers(boolean)
is set.- Returns:
- an unmodifiable list of the point barriers
- Since:
- 100.1.0
- See Also:
ClosestFacilityParameters.setPointBarriers(Iterable)
,ClosestFacilityParameters.setPointBarriers(ArcGISFeatureTable, QueryParameters)
-
getPolylineBarriers
public java.util.List<PolylineBarrier> getPolylineBarriers()
Gets the polyline barriers used in the closest facility route computation. Only available ifClosestFacilityParameters.setReturnPolylineBarriers(boolean)
is set.- Returns:
- an unmodifiable list of the polyline barriers
- Since:
- 100.1.0
- See Also:
ClosestFacilityParameters.setPolylineBarriers(Iterable)
,ClosestFacilityParameters.setPolylineBarriers(ArcGISFeatureTable, QueryParameters)
-
getPolygonBarriers
public java.util.List<PolygonBarrier> getPolygonBarriers()
Gets the polygon barriers used in the closest facility route computation. Only available ifClosestFacilityParameters.setReturnPolygonBarriers(boolean)
is set.- Returns:
- an unmodifiable list of the polygon barriers
- Since:
- 100.1.0
- See Also:
ClosestFacilityParameters.setPolygonBarriers(Iterable)
,ClosestFacilityParameters.setPolygonBarriers(ArcGISFeatureTable, QueryParameters)
-
getMessages
public java.util.List<java.lang.String> getMessages()
Gets the informational messages that were generated while computing closest facility routes.- Returns:
- an unmodifiable list of the messages
- Since:
- 100.1.0
-
getDirectionsLanguage
public java.lang.String getDirectionsLanguage()
Gets the language used when computing directions. The list of supported languages can be obtained by callingClosestFacilityTaskInfo.getSupportedLanguages()
.- Returns:
- the directions language
- Since:
- 100.1.0
-
getRoute
public ClosestFacilityRoute getRoute(int facilityIndex, int incidentIndex)
Gets the closest facility route by facility and incident indexes.- Parameters:
facilityIndex
- the facility's indexincidentIndex
- the incident's index- Returns:
- closest facility route
- Since:
- 100.1.0
-
getFacilityCosts
public java.util.List<java.lang.Double> getFacilityCosts(java.lang.String attributeName, int facilityIndex)
Gets the total cost values for a given accumulate attribute and facility.- Parameters:
attributeName
- attribute's namefacilityIndex
- facility's index- Returns:
- an unmodifiable list of total cost values for the specified attribute
- Throws:
java.lang.IllegalArgumentException
- if attributeName is null or emptyjava.lang.IllegalArgumentException
- if facilityIndex is negative- Since:
- 100.1.0
-
getRankedFacilityIndexes
public java.util.List<java.lang.Integer> getRankedFacilityIndexes(int incidentIndex)
Gets a list of facility indexes for given incident where index is rank level and value is facility index.// get the index of closest facility for incident with index 3 int closestFacilityIndex = getRankedFacilityIndexes(3).get(0); // rank of facility is 0 // get the index of second closest facility for incident with index 3 int secondClosestFacilityIndex = getRankedFacilityIndexes(3).get(1); // rank of facility is 1
- Parameters:
incidentIndex
- incident's index- Returns:
- an unmodifiable list of ranked facility indexes for given incident
- Throws:
java.lang.IllegalArgumentException
- if incidentIndex is negative- Since:
- 100.1.0
-
-