import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.EndpointGroupId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.groupbasedpolicy.sxp.integration.sxp.ep.provider.model.rev160302.sxp.ep.mapper.EndpointForwardingTemplateBySubnet;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.groupbasedpolicy.sxp.integration.sxp.ep.provider.model.rev160302.sxp.ep.mapper.EndpointPolicyTemplateBySgt;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.sxp.database.rev160308.Sgt;
/**
* Purpose: util methods for {@link EndpointForwardingTemplateBySubnet} and {@link EndpointPolicyTemplateBySgt}
});
}
+ public static Ordering<Sgt> createSgtOrdering() {
+ return Ordering.natural().onResultOf(new Function<Sgt, Comparable>() {
+ @Nullable
+ @Override
+ public Comparable apply(@Nullable final Sgt input) {
+ if (input == null) {
+ return EMPTY_COMPARABLE;
+ }
+ return MoreObjects.firstNonNull(input.getValue(), EMPTY_COMPARABLE);
+ }
+ });
+ }
+
public static class OptionalMutablePair<L, R> extends MutablePair<Optional<L>, Optional<R>> {
public OptionalMutablePair() {
super(Optional.absent(), Optional.absent());