List of usage examples for org.apache.commons.lang NullArgumentException NullArgumentException
public NullArgumentException(String argName)
Instantiates with the given argument name.
From source file:com.dsh105.commodus.Affirm.java
public static <T> T notNull(T object, String message) { if (object == null) { throwException(new NullArgumentException(message)); }//from www . j a v a 2s .c om return object; }
From source file:com.eyeq.pivot4j.util.CssWriter.java
/** * @param writer/*from w w w. j av a2s . c om*/ */ public CssWriter(Writer writer) { if (writer == null) { throw new NullArgumentException("writer"); } this.writer = new PrintWriter(writer); }
From source file:com.eyeq.pivot4j.ui.condition.AbstractCondition.java
/** * @param conditionFactory/* ww w . j av a 2s .c o m*/ */ public AbstractCondition(ConditionFactory conditionFactory) { if (conditionFactory == null) { throw new NullArgumentException("conditionFactory"); } this.conditionFactory = conditionFactory; }
From source file:com.eyeq.pivot4j.ui.command.AbstractCellCommand.java
/** * @param renderer/*from w w w . j ava 2 s. co m*/ */ public AbstractCellCommand(PivotUIRenderer renderer) { if (renderer == null) { throw new NullArgumentException("renderer"); } this.renderer = renderer; }
From source file:mitm.common.util.Check.java
/** * Checks if object is null and if so throws NullArgumentException. */// w w w .jav a 2 s . c o m public static void notNull(Object object, String parameter) { if (object == null) { throw new NullArgumentException(parameter); } }
From source file:com.eyeq.pivot4j.datasource.SingleConnectionOlapDataSource.java
public SingleConnectionOlapDataSource(OlapConnection connection) { if (connection == null) { throw new NullArgumentException("connection"); }//from ww w.j a va 2 s.c o m this.connection = connection; }
From source file:com.eyeq.pivot4j.ui.property.ConditionalValue.java
/** * @param condition//w ww . j a v a 2 s . co m * @param value */ public ConditionalValue(Condition condition, String value) { if (condition == null) { throw new NullArgumentException("condition"); } this.condition = condition; this.value = value; }
From source file:com.flipkart.poseidon.handlers.http.utils.StringUtils.java
/** * Joins the array of values with a given separator and returns the . *//*from w ww . j av a2 s . c om*/ public static String join(String[] arrayOfStrings, String separator) { boolean appendSeparator = false; if (arrayOfStrings != null) { StringBuilder stringBuilder = new StringBuilder(); for (String string : arrayOfStrings) { if (appendSeparator) { stringBuilder.append(separator); } else { appendSeparator = true; } stringBuilder.append(string); } return stringBuilder.toString(); } else { throw new NullArgumentException("arrayOfStrings"); } }
From source file:com.flipkart.phantom.task.utils.StringUtils.java
public static String join(String[] arrayOfStrings, String separator) { boolean appendSeparator = false; if (arrayOfStrings != null) { StringBuilder stringBuilder = new StringBuilder(); for (String string : arrayOfStrings) { if (appendSeparator) { stringBuilder.append(separator); } else { appendSeparator = true;/*from w ww . ja v a 2 s .com*/ } stringBuilder.append(string); } return stringBuilder.toString(); } else { throw new NullArgumentException("arrayOfStrings"); } }
From source file:com.eyeq.pivot4j.mdx.impl.MdxParserImpl.java
/** * @see com.eyeq.pivot4j.mdx.MdxParser#parse(java.lang.String) *//*from w w w.j ava 2 s. c o m*/ @Override public MdxStatement parse(String mdx) { if (mdx == null) { throw new NullArgumentException("mdx"); } MdxStatement query; try { CupParser parser = new CupParser(new StringReader(mdx)); Symbol parseTree = parser.parse(); query = (MdxStatement) parseTree.value; } catch (PivotException e) { throw e; } catch (Exception e) { String msg = "Failed to parse MDX query : " + mdx; throw new ParseException(msg, e); } return query; }