Class DefaultResourceRequest<T extends Resource>
java.lang.Object
org.jdrupes.builder.core.DefaultResourceRequest<T>
- Type Parameters:
T- the resource type
- All Implemented Interfaces:
Cloneable, ResourceRequest<T>
public class DefaultResourceRequest<T extends Resource>
extends Object
implements ResourceRequest<T>
An implementation of
ResourceRequest.-
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(ResourceType<?> type) Checks if the query accepts results of the given type.clone()booleaninthashCode()name()Returns the name that the requested resource should have.booleanrequires(ResourceType<?> type) Checks if the query requires results of the given type.toString()ResourceType<? extends T> type()Return the requested type.uses()Returns the intents to be used for selecting providers.Return a new resource request that uses project providers with the given intents.Return a new resource request for a resource with the given name.Methods inherited from interface ResourceRequest
using, usingAll
-
Method Details
-
clone
-
type
Description copied from interface:ResourceRequestReturn the requested type.- Specified by:
typein interfaceResourceRequest<T extends Resource>- Returns:
- the resource type
-
withName
Description copied from interface:ResourceRequestReturn a new resource request for a resource with the given name.
Support for resource names is optional and provider-specific. Expect the name to be ignored if not explicitly supported for a given resource type and provider.
- Specified by:
withNamein interfaceResourceRequest<T extends Resource>- Parameters:
name- the name- Returns:
- the resource request
-
name
Description copied from interface:ResourceRequestReturns the name that the requested resource should have.- Specified by:
namein interfaceResourceRequest<T extends Resource>- Returns:
- the name if set
-
using
Description copied from interface:ResourceRequestReturn a new resource request that uses project providers with the given intents.- Specified by:
usingin interfaceResourceRequest<T extends Resource>- Parameters:
intents- the intents- Returns:
- the resource request
-
uses
Description copied from interface:ResourceRequestReturns the intents to be used for selecting providers.- Specified by:
usesin interfaceResourceRequest<T extends Resource>- Returns:
- the sets the
-
accepts
Description copied from interface:ResourceRequestChecks if the query accepts results of the given type. This is short fortype().isAssignableFrom(type).- Specified by:
acceptsin interfaceResourceRequest<T extends Resource>- Parameters:
type- the type to check- Returns:
- true, if successful
-
requires
Description copied from interface:ResourceRequestChecks if the query requires results of the given type. This is short fortype.isAssignableFrom(type()).- Specified by:
requiresin interfaceResourceRequest<T extends Resource>- Parameters:
type- the type to check- Returns:
- true, if successful
-
hashCode
-
equals
-
toString
-