Class UtilityTraceFilter

java.lang.Object
com.esri.arcgisruntime.utilitynetworks.UtilityTraceFilter

public final class UtilityTraceFilter extends Object
A mechanism that can be used to stop tracing when returning results. UtilityTraceFilter objects do not stop traversability to the controller.

Consider an upstream protective device trace. At first, you might try defining a UtilityCategoryComparison that looks for a Protective Device category and assigning this to UtilityTraversability.getBarriers(). When you try to run an upstream trace using this configuration, it will probably fail. This is because traversability will stop at the first protective device, and the trace will be unable to find the subnetwork controller. The correct way to implement this trace is to assign UtilityCategoryComparison to the filter.

UtilityTraceFilter is set in the UtilityTraceConfiguration.

Since:
100.8.0
  • Constructor Details

    • UtilityTraceFilter

      public UtilityTraceFilter()
      Creates a new instance of UtilityTraceFilter.
      Since:
      100.8.0
  • Method Details

    • getBarriers

      public UtilityTraceCondition getBarriers()
      Gets a condition object specifying when to traverse a node or its subnodes.
      Returns:
      a condition object specifying when to traverse a node or its subnodes, or null if none has been set
      Since:
      100.8.0
    • setBarriers

      public void setBarriers(UtilityTraceCondition utilityTraceCondition)
      Sets a condition object specifying when to traverse a node or its subnodes.
      Parameters:
      utilityTraceCondition - a condition object specifying when to traverse a node or its subnodes
      Since:
      100.8.0
    • getBitsetNetworkAttribute

      public UtilityNetworkAttribute getBitsetNetworkAttribute()
      Gets a UtilityNetworkAttribute that stores a bitset, and this bitset should be used to filter results.
      Returns:
      a UtilityNetworkAttribute that stores a bitset, or null if none has been set
      Since:
      100.8.0
    • setBitsetNetworkAttribute

      public void setBitsetNetworkAttribute(UtilityNetworkAttribute utilityNetworkAttribute)
      Sets a UtilityNetworkAttribute that stores a bitset, and this bitset should be used to filter results.
      Parameters:
      utilityNetworkAttribute - UtilityNetworkAttribute that stores a bitset which should be used to filter
      Since:
      100.8.0
    • getFunctionBarriers

      public List<UtilityTraceFunctionBarrier> getFunctionBarriers()
      Gets a mutable list of utility trace function barriers. Add UtilityTraceFunctionBarrier to it to specify barriers. If any of these objects evaluates to true, further traversal is terminated.
      Returns:
      a mutable list of UtilityTraceFunctionBarrier that specify the function barriers. Initially it is empty.
      Since:
      100.8.0
    • getNearestNeighbor

      public UtilityNearestNeighbor getNearestNeighbor()
      Gets a filter object specifying the next N features to be returned from the starting point.
      Returns:
      a UtilityNearestNeighbor object specifying the next N features to be returned from the starting point, or null if none has been set
      Since:
      100.8.0
    • setNearestNeighbor

      public void setNearestNeighbor(UtilityNearestNeighbor nearestNeighbor)
      Sets a filter object specifying the next N features to be returned from the starting point.
      Parameters:
      nearestNeighbor - a UtilityNearestNeighbor object specifying the next N features to be returned from the starting point
      Since:
      100.8.0
    • getScope

      public UtilityTraversabilityScope getScope()
      Gets a UtilityTraversabilityScope value that determines whether traversability criteria are evaluated on edges, junctions, or both.

      Note: The default value is UtilityTraversabilityScope.JUNCTIONS_AND_EDGES.

      Returns:
      a UtilityTraversabilityScope value that determines whether traversability criteria are evaluated on edges, junctions, or both
      Since:
      100.8.0
    • setScope

      public void setScope(UtilityTraversabilityScope scope)
      Sets a value that determines whether traversability criteria are evaluated on edges, junctions, or both.
      Parameters:
      scope - a UtilityTraversabilityScope value
      Throws:
      IllegalArgumentException - if scope is null
      Since:
      100.8.0