Interface RoutingUtility
public interface RoutingUtility
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic StringaddressToString(List<Object> address) Converts the address, as represented by aList<Object>, to a human-readible string using the components'Object.toString()method.static HasNodeIdcheckAddressComponentHasNodeId(Object object) Ensure that the component is an instance ofHasNodeIdthrowing aRoutingExceptionif the object is not an instance ofHasNodeId.static NodeIdensureDistinctNode(List<Object> address, NodeId nodeId0, NodeId nodeId1) A reducer function intended to ensure that the suppliedNodeIds are all the same.reduceAddressToNodeIds(List<Object> address) static NodeIdreduceAddressToSingleNodeId(List<Object> address)
-
Method Details
-
reduceAddressToNodeIds
-
reduceAddressToSingleNodeId
-
addressToString
Converts the address, as represented by aList<Object>, to a human-readible string using the components'Object.toString()method.- Parameters:
address- the address- Returns:
- the string representation
-
checkAddressComponentHasNodeId
Ensure that the component is an instance ofHasNodeIdthrowing aRoutingExceptionif the object is not an instance ofHasNodeId.- Parameters:
object- the object to check- Returns:
- the object cast as
HasNodeId
-
ensureDistinctNode
A reducer function intended to ensure that the suppliedNodeIds are all the same.
-