if (o1 == null && o2 != null) return -1;
if (o1 != null && o2 == null) return 1;
return o1.position() - o2.position();
}
});
serviceDocument = new ResourceListing(swaggerConfig.apiVersion(), swaggerConfig.swaggerVersion(),
scala.collection.immutable.List.fromIterator(JavaConversions.asScalaIterator(apiListingReferences.iterator())),
scala.collection.immutable.List.fromIterator(JavaConversions.asScalaIterator(authorizationTypes.iterator())),
toSwaggerApiInfo(apiSource.getApiInfo()));
}