public static EndpointDescription[] selectBySecurityPolicy(EndpointDescription[] searchSet,SecurityPolicy policy){
  List<EndpointDescription> result=new ArrayList<EndpointDescription>();
  for (  EndpointDescription d : searchSet)   if (ObjectUtils.objectEquals(d.getSecurityPolicyUri(),policy.getPolicyUri()))   result.add(d);
  return result.toArray(new EndpointDescription[result.size()]);
}

public static EndpointDescription [ ] selectBySecurityPolicy ( EndpointDescription [ ] searchSet , SecurityPolicy policy ) { List < EndpointDescription > result = new ArrayList < EndpointDescription > ( ) ; for ( EndpointDescription d : searchSet ) if ( ObjectUtils . objectEquals ( d . getSecurityPolicyUri ( ) , policy . getPolicyUri ( ) ) ) result . add ( d ) ; return result . toArray ( new EndpointDescription [ result . size ( ) ] ) ; }
selects all endpoints that conform to given message security mode
