public class Versions
extends Object
Allows you to expand a stream of VersionedRoutes to a stream of Routes. Expanding a single
com.spotify.apollo.route.VersionedRoute to a Stream of Routes means prefixing the base Route's URI with '/vN' for each N
that the in the range [startVersion, lastVersion] where the com.spotify.apollo.route.VersionedRoute is valid and returning
new Routes with the new URIs.
Example:
com.spotify.apollo.route.Versions versions = com.spotify.apollo.route.Versions.from(0).to(2);
com.spotify.apollo.route.VersionedRoute vr = com.spotify.apollo.route.VersionedRoute.of(route).removedIn(2);
environment.routingEngine()
.registerRoutes(versions.expand(Stream.of(vr)))
.registerRoutes(versions.expand(myResource.versionedRoutes()));