Class FromHelper

java.lang.Object
org.jdrupes.builder.api.FromHelper

public class FromHelper extends Object
Helper class for implementing ResourceProvider.from(Stream).
  • Constructor Details

  • Method Details

    • without

      public FromHelper without(ResourceProvider provider)
      Exclude the given provider when requesting resources.
      Parameters:
      provider - the provider
      Returns:
      the from helper
    • without

      public FromHelper without(Class<? extends ResourceProvider> providerType)
      Exclude providers of the given type when requesting resources.
      Parameters:
      providerType - the provider type
      Returns:
      the from helper
    • log

      public FromHelper log(Consumer<ResourceProvider> providerLog)
      Register a callback for logging the providers used.
      Parameters:
      providerLog - the provider log
      Returns:
      the from helper
    • get

      public <T extends Resource> Stream<T> get(ResourceRequest<T> request)
      Returns the requested resources using the context and providers passed to the record's constructor.
      Type Parameters:
      T - the generic type
      Parameters:
      request - the request
      Returns:
      the stream