Module com.esri.arcgisruntime
Class UtilityNearestNeighbor
java.lang.Object
com.esri.arcgisruntime.utilitynetworks.UtilityNearestNeighbor
A filter set on
UtilityTraceFilter.getNearestNeighbor()
to return the next n features from the starting point.- Since:
- 100.8.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic UtilityNearestNeighbor
createWithAssetTypes
(UtilityNetworkAttribute costNetworkAttribute, int count, Iterable<UtilityAssetType> assetTypes) Creates a filter object to return the next n features from the starting point with asset types.static UtilityNearestNeighbor
createWithAssetTypesAndCategories
(UtilityNetworkAttribute costNetworkAttribute, int count, Iterable<UtilityAssetType> assetTypes, Iterable<UtilityCategory> categories) Creates a filter object to return the next n features from the starting point with asset types and categories.static UtilityNearestNeighbor
createWithCategories
(UtilityNetworkAttribute costNetworkAttribute, int count, Iterable<UtilityCategory> categories) Creates a filter object to return the next n features from the starting point with categories.Gets an unmodifiable list of UtilityAssetType that are used to define features to return.Gets an unmodifiable list of UtilityCategory that are used to define features to return.Gets theUtilityNetworkAttribute
used to determine the definition of "nearest".int
getCount()
Gets the number of nearest features to return.
-
Method Details
-
createWithAssetTypes
public static UtilityNearestNeighbor createWithAssetTypes(UtilityNetworkAttribute costNetworkAttribute, int count, Iterable<UtilityAssetType> assetTypes) Creates a filter object to return the next n features from the starting point with asset types.- Parameters:
costNetworkAttribute
- the UtilityNetworkAttribute used to determine the definition of "nearest"count
- the number of nearest features to return. This must be a positive number.assetTypes
- the collection of UtilityAssetType that define features to return- Returns:
- a UtilityNearestNeighbor
- Throws:
IllegalArgumentException
- if costNetworkAttribute is nullIllegalArgumentException
- if count is less than oneIllegalArgumentException
- if assetTypes is null or empty- Since:
- 100.8.0
-
createWithCategories
public static UtilityNearestNeighbor createWithCategories(UtilityNetworkAttribute costNetworkAttribute, int count, Iterable<UtilityCategory> categories) Creates a filter object to return the next n features from the starting point with categories.- Parameters:
costNetworkAttribute
- the UtilityNetworkAttribute used to determine the definition of "nearest"count
- the number of nearest features to return. This must be a positive number.categories
- the collection of UtilityCategory that are used to define features to return- Returns:
- a UtilityNearestNeighbor
- Throws:
IllegalArgumentException
- if costNetworkAttribute is nullIllegalArgumentException
- if count is less than oneIllegalArgumentException
- if categories is null or empty- Since:
- 100.8.0
-
createWithAssetTypesAndCategories
public static UtilityNearestNeighbor createWithAssetTypesAndCategories(UtilityNetworkAttribute costNetworkAttribute, int count, Iterable<UtilityAssetType> assetTypes, Iterable<UtilityCategory> categories) Creates a filter object to return the next n features from the starting point with asset types and categories.- Parameters:
costNetworkAttribute
- the UtilityNetworkAttribute used to determine the definition of "nearest"count
- the number of nearest features to return. This must be a positive number.assetTypes
- the collection of UtilityAssetType that are used to define features to returncategories
- the collection of UtilityCategory that are used to define features to return- Returns:
- a UtilityNearestNeighbor
- Throws:
IllegalArgumentException
- if costNetworkAttribute is nullIllegalArgumentException
- if count is less than oneIllegalArgumentException
- if assetTypes is nullIllegalArgumentException
- if categories is nullIllegalArgumentException
- if both assetTypes and categories are empty- Since:
- 100.8.0
-
getCostNetworkAttribute
Gets theUtilityNetworkAttribute
used to determine the definition of "nearest".- Returns:
- the utility network attribute
- Since:
- 100.8.0
-
getCount
public int getCount()Gets the number of nearest features to return.- Returns:
- the number of nearest features
- Since:
- 100.8.0
-
getAssetTypes
Gets an unmodifiable list of UtilityAssetType that are used to define features to return. This may be an empty list if created empty withcreateWithAssetTypesAndCategories(UtilityNetworkAttribute, int, Iterable<UtilityAssetType>, Iterable<UtilityCategory>)
or ifcreateWithCategories(UtilityNetworkAttribute, int, Iterable<UtilityCategory>)
was used to create an instance of this class.- Returns:
- an unmodifiable list of UtilityAssetType that are used to define features
- Since:
- 100.8.0
-
getCategories
Gets an unmodifiable list of UtilityCategory that are used to define features to return. This may be an empty list if created empty withcreateWithAssetTypesAndCategories(UtilityNetworkAttribute, int, Iterable<UtilityAssetType>, Iterable<UtilityCategory>)
or ifcreateWithAssetTypes(UtilityNetworkAttribute, int, Iterable<UtilityAssetType>)
was used to create an instance of this class.- Returns:
- an unmodifiable list of UtilityCategory that are used to define features
- Since:
- 100.8.0
-