Example usage for org.apache.commons.lang Validate noNullElements

List of usage examples for org.apache.commons.lang Validate noNullElements

Introduction

In this page you can find the example usage for org.apache.commons.lang Validate noNullElements.

Prototype

public static void noNullElements(Collection collection) 

Source Link

Document

Validate an argument, throwing IllegalArgumentException if the argument Collection has null elements or is null.

 Validate.noNullElements(myCollection); 

The message in the exception is 'The validated collection contains null element at index: '.

If the collection is null then the message in the exception is 'The validated object is null'.

Usage

From source file:ar.com.zauber.commons.dao.impl.ListRunnable.java

/** Creates the ListRunnable. */
public ListRunnable(final List<Runnable> runnables) {
    Validate.noNullElements(runnables);

    this.runnables = runnables;
}

From source file:ar.com.zauber.commons.repository.query.aggreate.CompositeAggregateFunction.java

/** constructor */
public CompositeAggregateFunction(final List<AggregateFunction> functions) {
    Validate.noNullElements(functions);

    this.functions = functions;
}

From source file:ar.com.zauber.commons.dao.predicate.AndPredicate.java

/** constructor */
public AndPredicate(final List<Predicate<T>> predicates) {
    Validate.noNullElements(predicates);

    this.predicates = predicates;
}

From source file:ar.com.zauber.commons.web.version.impl.AppenderMultipleVersionProvider.java

/** constructor */
public AppenderMultipleVersionProvider(final List<VersionProvider> providers) {
    Validate.noNullElements(providers);

    this.providers = providers;
}

From source file:ar.com.zauber.commons.web.transformation.censors.impl.SimpleCensorAccess.java

/** Creates the SimpleCensorAccess. */
public SimpleCensorAccess(final List<String> forbidenURIs) {
    Validate.noNullElements(forbidenURIs);

    this.forbidenURIs = forbidenURIs;
}

From source file:ar.com.zauber.commons.web.version.impl.MultipleVersionProvider.java

/**
 * Creates the MultipleVersionProvider./* ww w . ja va 2 s  .  co m*/
 *
 */
public MultipleVersionProvider(final List<VersionProvider> targets) {
    Validate.noNullElements(targets);

    this.targets = targets;
}

From source file:ar.com.zauber.commons.spring.beans.factory.impl.ProxyFactoryBean.java

/** Construye un ProxyFactoryBean a partir de las interfaces 
 * y el invocation handler *//*from w  w  w.  j  a  v  a 2s .c o  m*/
public ProxyFactoryBean(final List<Class<?>> interfaces, final InvocationHandler ih) {
    Validate.noNullElements(interfaces);
    Validate.notNull(ih);
    this.ih = ih;
    this.interfaces = interfaces;
}

From source file:ar.com.zauber.commons.dao.Ordering.java

/** @param orders orders*/
public Ordering(final List<Order> orders) {
    Validate.noNullElements(orders);
    this.orders = orders;
}

From source file:ar.com.zauber.commons.message.message.templates.MessageTemplateMessageFactory.java

/*** 
 * @param templateMap map: the key is the template name, the value a 
 *                    MessageTemplate //from w  ww  .j ava2  s  . co m
 */
public MessageTemplateMessageFactory(final Map<String, MessageTemplate> templateMap) {
    Validate.notNull(templateMap);
    Validate.noNullElements(templateMap.keySet());
    Validate.noNullElements(templateMap.values());

    this.templateMap = templateMap;
}

From source file:com.mousefeed.client.OnWrongInvocationModeTest.java

@Test
public void getLabelsTest() {
    assertEquals(getLabels().length, values().length);
    assertEquals(getLabels()[0], values()[0].getLabel());
    Validate.noNullElements(getLabels());
}