/** * Create an InvertibleComparator that sorts based on the provided order. * For the actual comparison, the specified Comparator will be used. * * @param comparator the comparator to decorate * @param ascending the sort order: ascending (true) or descending (false) */ public InvertibleComparator(Comparator<T> comparator, boolean ascending) { Assert.notNull(comparator, "Comparator must not be null"); this.comparator = comparator; setAscending(ascending); }
public DefaultOAuthStormpathFactorChallengeGrantRequestAuthentication(String state, String challenge, String code) { if (!Strings.hasText(state)) { Assert.hasText(challenge, "either state or challenge must be provided."); } Assert.hasText(code, "code cannot be null or empty."); this.state = state; this.challenge = challenge; this.code = code; }
public DefaultHttpRequest(Map<String, String[]> headers, HttpMethod method, Map<String, String[]> parameters, String queryParameters) { Assert.notNull(method, "method cannot be null."); Assert.notNull(headers, "headers cannot be null."); this.headers = headers; this.method = method; this.parameters = parameters; this.queryParameters = queryParameters; }
@Override public AttributeStatementMappingRuleBuilder setNameFormat(String nameFormat) { Assert.hasText(nameFormat, "nameFormat argument cannot be null or empty."); this.nameFormat = nameFormat; return this; }
public ClientBuilder setClientCredentials(ClientCredentials clientCredentials) { Assert.isInstanceOf(ClientCredentials.class, clientCredentials); this.clientCredentials = clientCredentials; return this; }
private int ensureOrderIndex() { int i = this.currentOrderIndex; Assert.state(i >= 0, "There is no current orderBy clause to declare as ascending or descending!"); return i; }
public LikeExpression(String propertyName, Object value, MatchLocation matchLocation) { super(propertyName, value, Operator.ILIKE); Assert.notNull(matchLocation, "matchLocation must not be null."); this.matchLocation = matchLocation; }
public DefaultOAuthStormpathFactorChallengeGrantRequestAuthentication(String state, String challenge, String code) { if (!Strings.hasText(state)) { Assert.hasText(challenge, "either state or challenge must be provided."); } Assert.hasText(code, "code cannot be null or empty."); this.state = state; this.challenge = challenge; this.code = code; }
public DefaultUsernamePasswordRequest setHost(String host) { Assert.hasText(host, "host cannot be null or empty."); this.host = host; return this; }
/** * @since 1.2.0 */ public ReadCacheFilter(BaseUrlResolver baseUrlResolver, CacheResolver cacheResolver, boolean collectionCachingEnabled) { super(cacheResolver, collectionCachingEnabled); Assert.notNull(baseUrlResolver, "baseUrlResolver cannot be null."); this.baseUrlResolver = baseUrlResolver; }
public CollectionReference(String name, Class<C> type, Class<T> instanceType) { super(name, type); Assert.notNull(instanceType, "instanceType argument cannot be null."); this.instanceType = instanceType; }
@Override public HttpRequestBuilder headers(Map<String, String[]> headers) { Assert.notNull(headers, "headers cannot be null"); this.headers = headers; return this; }
@Override public CreateSamlProviderRequestBuilder setRequestSignatureAlgorithm(String requestSignatureAlgorithm) { Assert.notNull(requestSignatureAlgorithm, "requestSignatureAlgorithm cannot be null or empty."); this.requestSignatureAlgorithm = requestSignatureAlgorithm; return this; }
@Override public CreateAccountRequestBuilder withResponseOptions(AccountOptions options) { Assert.notNull(options); this.options = options; return this; }
public DefaultResourceMessage(ResourceAction action, CanonicalUri uri, Class<? extends Resource> resourceClass, Map<String,Object> data) { Assert.notNull(action, "resource action cannot be null."); Assert.notNull(uri, "uri cannot be null."); Assert.notNull(resourceClass, "resourceClass cannot be null."); Assert.notNull(data, "data map cannot be null - specify an empty map instead of null."); this.action = action; this.uri = uri; this.resourceClass = resourceClass; this.data = data; }