Code example for Supplier

Methods: get

0
      this.regionToEndpoints = regionToEndpoints;
   } 
 
   @Override 
   public URI apply(Object from) {
      Map<String, Supplier<URI>> regionToEndpoint = regionToEndpoints.get();
      checkState(!regionToEndpoint.isEmpty(), "no region name to endpoint mappings configured!");
      checkArgument(regionToEndpoint.containsKey(from),
               "requested location %s, which is not a configured region: %s", from, regionToEndpoint);
      return regionToEndpoint.get(from).get();
   } 
}